This content has been marked as final.
Show 2 replies
-
1. Re: JBoss AS 7.1.1 Singleton with Startup and Asynchronous method not working
sfcoy Nov 1, 2012 9:07 PM (in response to ccob)You can't call the startAsync method from within the same EJB because it makes a direct method call instead of invoking through a proxy.
One approach would be to split it into two singleton EJBs and inject the one with Async method into the @Startup bean with @EJB. You can then call startAsync from the @PostConstruct method of the @Startup bean.
Consider moving this discussion over to the JBoss AS 7 forums.
Edit: Actually, the bean with @Asynchronous method just needs to be an ordinary stateless session bean if you do it this way.
-
2. Re: JBoss AS 7.1.1 Singleton with Startup and Asynchronous method not working
ccob Nov 2, 2012 8:10 AM (in response to sfcoy)That makes sense. Guess it's kind of similar to how Hibernate proxies work. Thanks for the help.