Blueprint - destroy-method not being called [message #905499] |
Thu, 30 August 2012 09:59  |
Eclipse User |
|
|
|
Hi All,
I'm using Blueprint 1.0.1 in JBoss AS 7.1.1 to deploy some services. I've notice that my bean shutdown methods as specified in the attribute "destroy-method" aren't being called. I'm seeing this trace in the console:
2.2.1
2012-08-30 14:43:57,949 ERROR [org.jboss.osgi.framework.internal.FrameworkEventsPlugin](MSC service thread 1-3) Framework ERROR: org.osgi.framework.BundleExcept
ion: Error during stop of bundle: org.eclipse.gemini.blueprint.extender:1.0.1.RELEASE
at org.jboss.osgi.framework.internal.HostBundleState.stopInternal(HostBundleState.java:425)
at org.jboss.osgi.framework.internal.BundleManager.uninstallBundle(BundleManager.java:446)
at org.jboss.osgi.framework.internal.UserBundleInstalledService.stop(UserBundleInstalledService.java:88)
at org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:1911)
at org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:1874)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
at java.util.AbstractCollection.removeAll(AbstractCollection.java:336)
at org.eclipse.gemini.blueprint.extender.internal.dependencies.shutdown.ShutdownSorter.getBundles(ShutdownSorter.java:65)
at org.eclipse.gemini.blueprint.extender.internal.activator.LifecycleManager.destroy(LifecycleManager.java:353)
at org.eclipse.gemini.blueprint.extender.internal.activator.ContextLoaderListener.shutdown(ContextLoaderListener.java:428)
at org.eclipse.gemini.blueprint.extender.internal.activator.ContextLoaderListener.stop(ContextLoaderListener.java:397)
at org.eclipse.gemini.blueprint.extender.internal.blueprint.activator.BlueprintLoaderListener.stop(BlueprintLoaderListener.java:57)
at org.eclipse.gemini.blueprint.extender.internal.boot.ChainActivator.stop(ChainActivator.java:66)
at org.jboss.osgi.framework.internal.HostBundleState.stopInternal(HostBundleState.java:394)
... 7 more
The NPE appears to be a secondary problem after an IllegalStateException is thrown in ShutdownSorter.unusedBundles. I did some debugging and it looks like the bundles it is trying to process are all in the state UNINSTALLED, so the IllegalStateException is to be expected.
The destroy-method works if I undeploy a bundle without stopping JBoss. The problem occurs when I do ctrl+c in the console. It is as though Felix is undeploying the bundles before Blueprint has a chance to do its stuff.
Is this correct behaviour?
Thanks,
Brad.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.13116 seconds