Reputation: 1384
I wrote a small test to understand asynchronized behavior in EJB3.1 using @Asynchronous
annotation. It seems that:
If the method exist in the same bean as the caller,
However, if the asynchronous method exists in another bean, the behavior is expected i.e. call is asynchronous and the caller transaction is independent (async method have REQUIRES_NEW behavior for transaction). This is puzzling for me, as why the behavior is not the same in both cases. Would someone please clarify?
P.S. Environment EJB 3.1, JBoss 6
Upvotes: 6
Views: 3352