Uploaded image for project: 'JBoss Transaction Manager'
  1. JBoss Transaction Manager
  2. JBTM-506

jtax subordinate TransactionImple confuses TwoPhaseOutcome and ActionStatus

    XMLWordPrintable

    Details

      Description

      In some methods of com.arjuna.ats.internal.jta.transaction.arjunacore.subordinate.TransactionImple, code of the form

      int res = subAct.doFoo();
      switch(res)
      case ActionStatus.Bar:

      is found. This is incorrect, as the methods on SubordinateAtomicAction return TwoPhaseOutome not ActionStatus. In the JTA the SubordinateAtomicAction returns ActionStatus which is probably where the confusion arises, so arguably it's actually the JTAX SubordinateAtomicTransaction which is at fault, not the TransactionImple.

      Since the case statements will need reworking anyhow, it's probably worth looking that the way 'try to commit but actually have to rollback' is handled. In the JTA this throws RollbackException as the rollback is clean. In the JTAX it results in a HeuristicRollback due to the way the states and exceptions are mapped. This is perhaps less user friendly than it could be.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                marklittle Mark Little
                Reporter:
                jhalliday Jonathan Halliday
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: