if (comp != null && !LifeCycleMBean.SHUTDOWN.equals(comp.getCurrentState())) {
if (!force) {
throw ManagementSupport.failure("uninstallComponent", "Component '" + getName() + "' is not shut down.");
}
if (LifeCycleMBean.STARTED.equals(comp.getCurrentState())) {
comp.stop(false);
}
if (LifeCycleMBean.STOPPED.equals(comp.getCurrentState())) {
comp.shutDown(false, force);
}
}