An enterprise bean should not invoke resource manager-specific transition demarcation API methods (like j ava.sql.Connection.commit(), java.sql.Connection.rollback(), etc.) while within a transaction.
Stateless session beans should always either commit or rollback a transaction before the business method returns. Stateful session beans do not have this requirement. Instead of calling EJBContext .getRollBackOnly(), and javax.ejb.EJBContext.setRollbackOnly() , use the corresponding JTA API calls.


0 comments:
Post a Comment