Remus Vitan wrote:
does anybody know if this solution is safe ? (managing the chain of contexts using threadlocal, is it guaranteed that the calls will reside in the same thread ?)
If the invocation is on an @Asynchronous method then it won't stay on the same thread. Neither will it if the invocation ends up as being a remote invocation on a different server.
Thank you for your answer!
From what you have mantioned i am safe because :
- I forgot to mention that all the calls to the beans are made Local
- and don't use at all the @Asynchronous on the invocation
Btw, would it be a problem if @Asynchronous is specified only on the ejbMethod1 ? (i guess the rest of calls will stay on the same thread)