[jboss-user] [EJB 3.0] - Re: Executing a session bean method in transaction

PeterJ do-not-reply at jboss.com
Fri Nov 28 11:52:25 EST 2008


Session bean methods defined as transactional happen within a single transaction. So in your case all of the queries (or updates) within that method are done within the same transaction.

You can specify the transaction scope like this:

@TransactionAttribute(TransactionAttributeType.REQUIRED)
public void someMethod(...)

REQUIRED is the default, so you could actually leave it off.

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

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



More information about the jboss-user mailing list