public UserTransaction getUserTransaction()
{
AllowedOperationsAssociation.assertAllowedIn("getUserTransaction",
IN_EJB_CREATE | IN_EJB_REMOVE | IN_BUSINESS_METHOD | IN_EJB_TIMEOUT | IN_SERVICE_ENDPOINT_METHOD);
final UserTransaction ut = super.getUserTransaction();
return new UserTransaction()
{
public void begin() throws NotSupportedException, SystemException
{
checkUserTransactionMethods();
ut.begin();
}
public void commit() throws RollbackException,
HeuristicMixedException,
HeuristicRollbackException,
SecurityException,
IllegalStateException,
SystemException
{
checkUserTransactionMethods();
ut.commit();
}
public void rollback() throws IllegalStateException, SecurityException, SystemException
{
checkUserTransactionMethods();
ut.rollback();
}
public void setRollbackOnly() throws IllegalStateException, SystemException
{
checkUserTransactionMethods();
ut.setRollbackOnly();
}
public int getStatus() throws SystemException
{
checkUserTransactionMethods();
return ut.getStatus();
}
public void setTransactionTimeout(int seconds) throws SystemException
{
checkUserTransactionMethods();
ut.setTransactionTimeout(seconds);
}
};
}