"Invoking a non-transactional method (while the bean is in the METHOD-READY-IN-TX state makes the EJB container to throw an error to the client."
Could you please explain this further to me ?
SCJP | SCWCD | SCBCD | SCWSD 5 | SCEA (I) 1.4 | SCEA 5 | IBM SOA 669
Benoît de Chateauvieux
posted 9 years ago
The reason is in the specs 4.4.4:
If a session bean instance is participating in a transaction, it is an error for a client to invoke a method on the session object such that the transaction attribute specified in the bean�s metadata annotations and/or the deployment descriptor would cause the container to execute the method in a different transaction context or in an unspecified transaction context. In such a case, the javax.ejb.EJBException will be thrown to a client of the bean�s business interface.
In other words:
You cannot change the transactional context of a stateful session bean (for another or null context) if it is already involved in a transaction. It's true for all stateful session bean wether it implements SessionSynchronization or not.
Hope it helps...
SCJP5 | SCBCD5 | SCEA5 Part 1
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads