This content has been marked as final.
Show 1 reply
-
1. Re: Why every find / select query executes a commit?
gerbrand Feb 15, 2009 4:03 PM (in response to fabianignacio)Do you also annotate your class with a transaction attribute?
We use
@TransactionAttribute( TransactionAttributeType.REQUIRED )
That should be the default, although I'm not sure. With the above attribute, when a (EJB) method within an existing transaction, that transaction is used. A new transaction is started only when no transaction exists/is started.
With: @TransactionAttribute( TransactionAttributeType.NEW_REQUIRED ) every ejb method will use its own transaction.