Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-6116

UserTransaction.commit()/rollback() are not fully compliant with the JTA standard

XMLWordPrintable

    • Low

      JTA spec says the following UserTransaction.rollback():

      "Roll back the transaction associated with the current thread. When this method completes, the thread becomes
      associated with no transaction."

      Currently though, the transaction propagation context (tpc) is only cleared upon rollback() being called successfully.
      If any exceptions arise from the rollback() call on the server, the tpc is not cleared, leaving it lingering. A finally section
      needs to be added to ClientUserTransaction.rollback() so that the tpc is cleared.

      Similar thing happens with UserTransaction.commit()L

      "When this method completes, the thread becomes associated with no transaction. "

      Currently though, the transaction propagation context (tpc) is only cleared upon commit() being called successfully
      or upon a RollbackException. If any exceptions arise from the commit() call on the server, the tpc is not cleared, leaving
      it lingering. A finally section needs to be added to ClientUserTransaction.commit() so that the tpc is cleared.

      Besides, handling of org.jboss.remoting.CannotConnectException needs adding to rollback()/commit() to react in the
      same way as for RemoteException.

            rh-ee-galder Galder ZamarreƱo
            rh-ee-galder Galder ZamarreƱo
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: