This content has been marked as final.
Show 1 reply
-
1. Re: Create new transaction for a method of a SSB
lafr Jun 16, 2003 3:13 PM (in response to lvhuyen)Enhance ManagerEJB with the following field and method:
private javax.ejb.SessionContext sessionCtxt = null;
public void setSessionContext( javax.ejb.SessionContext ctxt )
{
this.sessionCtxt = ctxt;
}
in catch-block of the exception:
this.sessionCtxt.setRollbackOnly();
This will cause a rollback instead of a commit when leaving the SessionBean method.