Uploaded image for project: 'Geronimo'
  1. Geronimo
  2. GERONIMO-4466

Improve exception during transaction manager commit when there are multiple XAResources

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.1.4, 2.2
    • 2.1.4, 2.2
    • transaction manager
    • Security Level: public (Regular issues)
    • None

    Description

      When tm.commit is invoked and there are multiple XAResources enlisted. if there are one or more XAExceptions arisen from one or more of these XAResources during commit, the code simply throws SystemException. I propose the following updates to provide more detailed exceptions:

      1. If the XAException is XAException.XA_HEURRB from one XAResource and there is no other exceptions from other XAResources, we throw HeuristicMixedException (because there are heuristic conditions and some are committed some are rolled back), and call the XAResource to forget.
      2. If all XAResources report XAException.XA_HEURRB, we throw HeuristicRollbackException, and call the these XAResources to forget
      3. If the XAException is XAException.XA_HEURRB from one or more XAResources however one or more XAResource are able to commit something (either no exception during commit, or throw XAException.XA_HEURMIX /XAException.XA_HEURCOM to indicate something gets committed), we throw HeuristicMixedException, and call the XAResources to forget.
      2. If the XAException is XAException.XA_HEURMIX from one XAResource, and no matter what other heuristic exceptions reported by other XAResources, we throw HeuristicMixedException, and call the XAResource to forget
      3. If the XAException is XAException.XA_HEURCOM, we don't need to inform the transaction originator, but we want to call XAResource to forget.

      Comments welcome.

      Attachments

        Activity

          People

            linsun Lin Sun
            linsun Lin Sun
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: