+ if (bundle.getBundleId() == FRAMEWORK_BUNDLE_ID) {
+ LOG.debug("Framework bundle {} got event {}", bundle, event.getType());
+ if ((event.getType() & BundleEvent.STOPPING) != 0) {
+ LOG.info("OSGi framework is being stopped, halting bundle scanning");
+ stopping = true;
+ }
+ }