Hi

The spec mandates @PostConstruct to finish before business method are
called. That's what we do blocking to start the @Async method. If you
rmethod is not @Async it obviously doesn't work.
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2013/10/24 zmirc <[email protected]>:
> Hi!
>
> Mark might have a good point, which can be shown with the current example
> (see code).
> By removing @Asynchronous from this EJB, Tomee does blocks for ever.
> If @Asynchronous is not commented out, then it works perfectly, with async
> doingHardWork() method being executed after the @PostConstruct init(), even
> though it is called inside the @PostConstruct. That should be ok.
>
> It's maybe not so ok if @Asynchronous is removed. Shouldn't SessionContext
> throw an exception or something if someone tries to use it in this way that
> blocks Tomee deployment completely?
>
> Async.java <http://openejb.979440.n4.nabble.com/file/n4665718/Async.java>
>
>
>
> --
> View this message in context: 
> http://openejb.979440.n4.nabble.com/Async-call-blocks-in-PostConstruct-tp4665703p4665718.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.

Reply via email to