2 Replies Latest reply on Mar 15, 2006 9:37 PM by Alexander Sack

    @PreDestory callback behavior for Stateless beans

    Alexander Sack Novice

      Is there any way to cause a @PreDestory callback to be executed programmactically? I thought if I undeploy the jar file in which EJB3 Stateless beans are defined, any @PreDestroy callbacks defined would be called. That doesn't seem to be the case and it maybe my misunderstanding of an EJB3 lifecycle. (4.03SP1/EJB3-RC5)

      From the JBoss doc, it claims that the @PreDestory callback is called when a bean is destoryed or removed from the pool. I thought obviously undeployment would do this but if not, what can cause this or is this callback strictly container controlled?