This content has been marked as final.
Show 2 replies
-
1. Re: JBoss 7.1 calls ServletContextListener only after destroy the application context
ctomc Feb 8, 2014 10:41 AM (in response to valdemir)1 of 1 people found this helpfulEJB singleton @Startup bean with method annotated as @PreDestroy
-
2. Re: JBoss 7.1 calls ServletContextListener only after destroy the application context
valdemir Feb 10, 2014 2:36 PM (in response to ctomc)Hi, Tomaz. Thanks for your response.
I created an EJB singleton @Startup and a method with @PreDestroy annotation but it is called after the application context has been destroyed, like ServletContextListener case.
My EJB:
@Startup
@Singleton
public class DeliverySingleton
{
....
@PreDestroy
public void whenServerShutdown()
{
...
}
}