in jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/ComponentInstaller.java [185:202]
public void stop(boolean force) throws Exception {
ComponentImpl comp = deployer.getComponent(getName());
if (comp == null && !force) {
throw ManagementSupport.failure("uninstallComponent", "Component '" + getName() + "' is not installed.");
}
// Check component state is shutdown
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);
}
}
}