public DeploymentStatus stop(String moduleID, String targetName,
Map options) {
try {
sLogger.log(Level.FINE, "mbean.stop", moduleID);
DeploymentStatus status = DeploymentService.getDeploymentService().stop(moduleID,
targetName, options);
//deployment already added all required config changes to its events
// so, we remove them to avoid extra deployment events
getConfigContext().flush();
getConfigContext().resetConfigChangeList();
return status;
} catch (Exception e) {
sLogger.log(Level.WARNING, "mbean.stop_failed", e);
DeploymentStatus ds = new DeploymentStatus();
ds.setStageException(e);
ds.setStageStatus(DeploymentStatus.FAILURE);
ds.setStageStatusMessage(e.getMessage());
ds.setStageDescription("Stop");
return ds;
}
}