-
1. Re: PreDestroy callback is not being called by container
konkimalla Oct 10, 2007 4:11 PM (in response to konkimalla)A small correction to my note.
Predestroy is being called when I called the method having @Remove annotation. However, when JBOSS is shutdown gracefully, I don't see the predestroy method being called. -
2. Re: PreDestroy callback is not being called by container
dietice Oct 29, 2007 8:21 PM (in response to konkimalla)This is just jboss. Dont think they support standards or should I say they have their own standards :).
Spent a few days on this & gone back to ejb 2.1.
See Bill's comment in
http://jboss.com/index.html?module=bb&op=viewtopic&t=87859&postdays=0&postorder=asc&start=10 -
3. Re: PreDestroy callback is not being called by container
alrubinger Oct 30, 2007 12:55 AM (in response to konkimalla)In areas where the specification lacks explicitly-defined behavior, it is the responsibility of the vendor to fill in the gaps.
It is the intention of JBoss to support all standards and ensure that applications remain as portable across implementations as possible.
Spec 4.3.11 and 4.4, Figure 5 do not dictate that the PreDestroy callback be called on undeployment. In fact, 4.4.3 says:The Bean Provider cannot assume that the container will always invoke the PreDestroy lifecycle callback interceptor method(s) (or ejbRemove method) for a session bean instance.
Is it possible for you to use "destroy" of an @Service/MBean/Singleton to fulfill your requirements?
http://docs.jboss.org/ejb3/app-server/reference/build/reference/en/html/jboss_extensions.html
S,
ALR -
4. Re: PreDestroy callback is not being called by container
wolfc Oct 30, 2007 8:15 AM (in response to konkimalla)In AS 4.2.2 the ThreadlocalPool does call @PreDestroy on undeploy. This is a 'side effect' of another issue with ThreadlocalPool.
See http://jira.jboss.com/jira/browse/EJBTHREE-1031