if (componentName == null) {
throw new BuildException("null compoenntName");
}
try {
ManagementContextMBean is = getManagementContext();
is.stopComponent(componentName);
}
catch (IOException e) {
log.error("Caught an exception stopping component", e);
throw new BuildException(e);
}