[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Why every find / select query executes a commit?

gerbrand do-not-reply at jboss.com
Sun Feb 15 16:03:40 EST 2009


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.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4210193#4210193

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4210193



More information about the jboss-user mailing list