5 Replies Latest reply on Jul 10, 2007 10:18 AM by Mark Little

    Transaction.commit() vs TransactionManager.commit(), thread-

    Andrew Perepelytsya Newbie

      According to the JTA spec, only TM.commit/rollback methods disassociate the current thread from the transaction (let's leave out suspend/resume with params for simplicity). Direct invocation of Transaction.commit() does NOT break the association and the transaction is still bound in COMMITTED state - any attempt to begin a new transaction would fail with a NotSupportedException.

      My confusion is on when would Transaction.commit() be used instead of TM.commit() if there's such a fundamental difference in behavior?

      Andrew