This content has been marked as final.
Show 2 replies
-
1. Re: Shutdown order
jameslivingston Apr 20, 2015 8:39 PM (in response to nlsurfman)How are you accessing the ConnectionFactory? If you inject it with @Resource, or bind it into the EJB's ENC (java:comp/env) via the deployment descriptor, the container should make sure it is available for the life of the EJB.
If you look it up from global JNDI in @PostConstruct, then JBoss does not know that you need it available until the end of the @PreDestroy method.
-
2. Re: Shutdown order
nlsurfman Apr 21, 2015 6:53 AM (in response to jameslivingston)Well spotted. In @PreDestroy I used a helper class to lookup the ConnectionFactory and the Topic. Instead of that I now created them as @Resource and that informs WildFly properly. I always thought @EJB and @Resource were mainly for convenience, but apparently there is more to it than that
Thanks!