ContainerLifecycle lifecycle = lifecycleProducer.get();
if (lifecycle != null)
{
// end the session lifecycle
lifecycle.stopApplication(null);
}
final ClassLoader current = Thread.currentThread().getContextClassLoader();
if (OwbSWClassLoader.class.isInstance(current))
{ // should be the case