Tuesday, March 15, 2011


if you "manually" commit a transaction, you might get:

javax.ejb.EJBTransactionRolledbackException: Illegal to call this method from injected, managed EntityManager

in this case you should annotate the method:

to make the transaction management "manual".

You can't have both worlds: either you let the container manage the "begin/end/rollback" lifecycle, or you manage it in its entirety.

No comments: