Derby
  1. Derby
  2. DERBY-1016

javax.transaction.xa.forget (Xid) raises XAER_NOTA exception instead of XA_PROTO on a prepared transaction

    Details

    • Urgency:
      Normal
    • Issue & fix info:
      High Value Fix, Known fix, Newcomer, Release Note Needed, Repro attached

      Description

      javax.transaction.xa.forget (Xid) raises XAER_NOTA exception instead of XA_PROTO on a prepared transaction

      I posted a question to derby-dev about this and heard no response so am assuming it is indeed a bug.

      in the XA+
      specification, it seems like xa_forget should only be valid for a
      heuristically completed transaction, so should be XAER_PROTO
      and not XAER_NOTA.

      In xaStateTran.sql we have this case:

      – get back into prepared state
      xa_start xa_noflags 50;
      insert into xastate values(2);
      xa_end xa_success 50;
      xa_prepare 50;

      select * from global_xactTable where gxid is not null order by gxid;

      – the following should error XAER_NOTA
      xa_forget 50;

      The user code I am looking at handles forget like this. They expect
      XAER_PROTO in this case.

      try

      { xaRes.forget(xidList[i]); System.out.print("XA-Transaction [" + (i+1) + "] Forgotten. \n" ); }

      catch (XAException XAeForget) {
      if ( XAeForget.errorCode ==
      XAException.XAER_PROTO )

      { System.out.print("XA-Transaction [" + (i+1) + "] not heuristically completed yet - Rolling Back instead. \n" ); xaRes.rollback(xidList[i]); System.out.print("XA-Transaction [" + (i+1) + "] Rolled Back. \n" ); }

      if ( XAeForget.getMessage() != null ) {
      System.out.println("XAException " +
      XAeForget.getMessage() );

      1. releaseNote.html
        1 kB
        Rick Hillegas
      2. releaseNote.html
        1 kB
        Rick Hillegas
      3. releaseNote.html
        1 kB
        Jayaram Subramanian
      4. DERBY-1016.diff
        4 kB
        Myrna van Lunteren
      5. runoutputNov30.out
        1 kB
        Jayaram Subramanian
      6. derby1016-stat.txt
        0.9 kB
        Jayaram Subramanian
      7. derby1016-donotcommit.diff
        4 kB
        Jayaram Subramanian
      8. DERBY-1016.patch
        3 kB
        Tiago R. Espinha
      9. DERBY-1016.patch
        2 kB
        Tiago R. Espinha
      10. DERBY-1016_Patch_1.diff
        0.5 kB
        Ravinder Reddy
      11. utilXid.java
        2 kB
        Kathey Marsden
      12. ReproDerby1016.java
        3 kB
        Kathey Marsden

        Activity

        Gavin made changes -
        Workflow jira [ 12347355 ] Default workflow, editable Closed status [ 12802864 ]
        Knut Anders Hatlen made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Rick Hillegas made changes -
        Attachment releaseNote.html [ 12528116 ]
        Rick Hillegas made changes -
        Attachment releaseNote.html [ 12528049 ]
        Jayaram Subramanian made changes -
        Attachment releaseNote.html [ 12527999 ]
        Kathey Marsden made changes -
        Labels derby_triage10_5_2 derby_backport_reject_10_8 derby_triage10_5_2
        Issue & fix info Repro attached,Newcomer,Known fix,High Value Fix [ 10424,10423,10426,10422 ] High Value Fix,Known fix,Newcomer,Release Note Needed,Repro attached [ 10422,10426,10423,10101,10424 ]
        Myrna van Lunteren made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Myrna van Lunteren made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Myrna van Lunteren made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Issue & fix info Repro attached,Patch Available,Newcomer,Known fix,High Value Fix [ 10424,10102,10423,10426,10422 ] High Value Fix,Known fix,Newcomer,Repro attached [ 10422,10426,10423,10424 ]
        Fix Version/s 10.9.0.0 [ 12316344 ]
        Resolution Fixed [ 1 ]
        Myrna van Lunteren made changes -
        Attachment DERBY-1016.diff [ 12505579 ]
        Jayaram Subramanian made changes -
        Issue & fix info Repro attached,High Value Fix,Known fix,Newcomer [ 10424,10422,10426,10423 ] High Value Fix,Known fix,Newcomer,Patch Available,Repro attached [ 10422,10426,10423,10102,10424 ]
        Jayaram Subramanian made changes -
        Attachment derby1016-donotcommit.diff [ 12505443 ]
        Attachment derby1016-stat.txt [ 12505444 ]
        Attachment runoutputNov30.out [ 12505445 ]
        Jayaram Subramanian made changes -
        Assignee Jayaram Subramanian [ rsjay1976 ]
        Kathey Marsden made changes -
        Labels derby_triage10_5_2
        Tiago R. Espinha made changes -
        Assignee Tiago R. Espinha [ espinha ]
        Tiago R. Espinha made changes -
        Attachment DERBY-1016.patch [ 12415651 ]
        Tiago R. Espinha made changes -
        Attachment DERBY-1016.patch [ 12415426 ]
        Tiago R. Espinha made changes -
        Assignee Tiago R. Espinha [ espinha ]
        Kathey Marsden made changes -
        Assignee Ravinder Reddy [ pandiri ]
        Issue & fix info [Repro attached, Newcomer, High Value Fix] [High Value Fix, Known fix, Newcomer, Repro attached]
        Rick Hillegas made changes -
        Urgency Normal
        Issue & fix info [Newcomer, High Value Fix] [High Value Fix, Newcomer, Repro attached]
        Dag H. Wanvik made changes -
        Issue & fix info [Newcomer] [High Value Fix, Newcomer]
        Dag H. Wanvik made changes -
        Issue & fix info [High Value Fix] [Newcomer]
        Dag H. Wanvik made changes -
        Issue & fix info [High Value Fix]
        Ravinder Reddy made changes -
        Attachment DERBY-1016_Patch_1.diff [ 12409286 ]
        Kathey Marsden made changes -
        Attachment utilXid.java [ 12408484 ]
        Ravinder Reddy made changes -
        Assignee Ravinder Reddy [ pandiri ]
        Kathey Marsden made changes -
        Derby Categories [High Value Fix, Newcomer]
        Kathey Marsden made changes -
        Field Original Value New Value
        Attachment ReproDerby1016.java [ 12408134 ]
        Kathey Marsden created issue -

          People

          • Assignee:
            Jayaram Subramanian
            Reporter:
            Kathey Marsden
          • Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development