* @return Result/Status of this operation.
* @throws Exception if operation fails.
*/
public String shutDown(String serviceAssemblyName) throws Exception {
String result = DeploymentServiceMBean.STOPPED;
ServiceAssembly sa = (ServiceAssembly) serviceAssembilies.get(serviceAssemblyName);
if (sa != null) {
ServiceUnit[] sus = sa.getServiceUnits();
if (sus != null) {
for (int i = 0;i < sus.length;i++) {
String componentName = sus[i].getTarget().getComponentName();
Component component = container.getComponent(componentName);
if (component != null) {
ServiceUnitManager sum = component.getServiceUnitManager();
if (sum != null) {
sum.shutDown(sus[i].getIdentification().getName());
}
}
}
}
result = DeploymentServiceMBean.SHUTDOWN;
sa.setState(result);
log.info("Shutdown Service Assembly: " + serviceAssemblyName);
}
return result;
}