if(!instance.isRunning())
return null;
try {
logger.info(Strings.get("stop.instance.init", instanceName));
RemoteAdminCommand rac = new ServerRemoteAdminCommand(habitat, "_stop-instance",
host, port, false, "admin", null, logger);
// notice how we do NOT send in the instance's name as an operand!!
ParameterMap map = new ParameterMap();
map.add("force", Boolean.toString(force));
rac.executeCommand(map);
}
catch (CommandException ex) {
return Strings.get("stop.instance.racError", instanceName,
ex.getLocalizedMessage());
}