1. xadisk
  2. XADISK-84

For standalone XA usage of XADisk, there is no defined API to retireve lists of in-doubt transactions after crash.


    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: 1.2
    • Component/s: connector
    • Labels:


      For standalone XA usage of XADisk (e.g with Atomikos), an XASession can be obtained from XAFileSystem reference by this method:


      XAFileSystem xafs;

      But this method would return the XASession only if the XADisk instance has completed its recovery, which also includes completion of in-doubt transactions which were ongoing before the crash/shutdown.

      As of 1.1, the only "documented" method to retrieve XAResource in standalone XA usage is from the XASession object. An XAResource object is an XA standard object which is used by a Transaction Manager (TM) for post crash recovery, so that the TM can complete the in-doubt transactions. Since XASession object cannot be retrieved until the recovery is complete (there is a checkIfContinue() check), it means there is no way to obtain the XAResource object before the recovery completes. But, recovery is fully dependent on completion of all in-doubt transactions. This becomes a deadlock situation.

      As a fix, there should be an API to retrieve XAResource object even before recovery completes so that TM can get informed what transactions are in-doubt and can then complete them.

      A workaround for 1.1 is to use the following method for the purpose of obtaining XAResource object (post crash) so that it can be passed on to the TM:


      XAResource xarRecovery = new org.xadisk.filesystem.NativeXASession(xafs, "instance-id").getXAResource();


        Nitin Verma added a comment -

        Checked-in the changes to trunk.

        Nitin Verma added a comment - Checked-in the changes to trunk.


          • Assignee:
            Nitin Verma
            Nitin Verma
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: