}
}
}
if (component instanceof ScopedRuntimeComponent) {
ScopedRuntimeComponent runtimeComponent = (ScopedRuntimeComponent)component;
if (runtimeComponent.getScopeContainer() != null &&
runtimeComponent.getScopeContainer().getLifecycleState() != ScopeContainer.STOPPED) {
try {
runtimeComponent.getScopeContainer().stop();
} catch (Throwable ex){
Monitor.error(monitor, this, "core-messages", "StopException", ex);
}
}
}