Posted By:
Anonymous
Posted On:
Thursday, January 16, 2003 06:01 AM
The container will call the commit and rollback for you. If an exception occurs that causes you to want to rollback you need to tell the container that the transaction should be aborted. You do this by calling
EJBContext.setRollbackOnly() (where EJBContext is a SessionContext or an EntityContext in the case of entity beans).
The
EJB spec indicates that when using container managed transactions that you
should not call commit, rollback or setAutocommit on the connection. You do need to call close in order to release the connection back into the pool.
Take a look at section 17.3.4, it should give you some more details.
Cortez