+
+ private class shutdownHandler extends Thread {
+ BundleContext bundlecontext;
+ public shutdownHandler(BundleContext ctxt) {
+ this.bundlecontext = ctxt;
+ }
+
+ public void run () {
+ try {
+ this.bundlecontext.getBundle(0).stop();
+ log.debug("shutdown handler thread called");
+ } catch (BundleException e) {
+ log.debug("Bundle couldn't be stopped");
+ }
+ }
+ }
+