glassfish
  1. glassfish
  2. GLASSFISH-20926

Exception during commit of LAO resources not controllable

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 4.0
    • Fix Version/s: None
    • Component/s: jts
    • Labels:
      None
    • Environment:

      Embedded Glassfish v. 4.0

      Description

      Exceptions that occur during the commit of LAO resource's LocalTransaction are not controllable, because the thrown Exception is simply replaces by a specific XAException in ConnectorXAResource.

      This makes it impossible for the calling app code to catch the exception that was the cause for the failed commit and to react accordingly.

      Moreover, the LAO resource might want to vote for a rollback of the whole global transaction, which is not possible today (the exception is replaced by an INTERNAL later on that doesn't lead to a rollback as far as I understood the code).
      This in turn leaves the whole global transaction in a broken state.

      My suggestion would be to allow the LAO resource's LocalTransaction to rethrow an XAException with the right errorCode that would not be replaced inside ConnectorXAResource, but just thrown.
      If the LAO resource's LocalTransaction throws any other exception than a XAException, the process would remain as it is today.

      I could provide this quite simple modification, if you want me to.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            paul_parkinson
            Reporter:
            morphace
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: