@ FFDCIgnore ( Exception . class ) protected final void shutdownFramework ( ) { try { Bundle bundle = context . getBundle ( Constants . SYSTEM_BUNDLE_LOCATION ) ; if ( bundle != null ) bundle . stop ( ) ; } catch ( Exception e ) { // Exception could happen here if bundle context is bad, or system bundle // is already stopping: not an exceptional condition, as we // want to shutdown anyway. } }
When an error occurs during startup then this method is used to stop the root bundle thus bringing down the OSGi framework .