Class TransactionIdHelper


  • public abstract class TransactionIdHelper
    extends Object
    Helper class for converting between Xids and WS-AT transaction Ids.
    • Constructor Detail

      • TransactionIdHelper

        public TransactionIdHelper()
    • Method Detail

      • getInstance

        public static TransactionIdHelper getInstance()
        Returns the TransactionIdHelper instance.
        Returns:
        the TransactionIdHelper instance.
      • xid2wsatid

        public abstract String xid2wsatid​(Xid xid)
        Convert a Xid to WS-AT Id format.
        Parameters:
        xid - A Xid.
        Returns:
        The transaction id in WS-AT format
      • wsatid2xid

        public abstract Xid wsatid2xid​(String wsatid)
        Convert a WS-AT Id that was generated from a Xid back into a Xid
        Parameters:
        wsatid - A -based WS-AT tid
        Returns:
        A Xid
      • getOrCreateXid

        public abstract Xid getOrCreateXid​(byte[] tid)
        Returns a foreign Xid that is mapped to the specified WS-AT transaction Id.
        Parameters:
        tid - A foreign WS-AT tid in string representation.
        Returns:
        A foreign Xid that is mapped ot the tid.
      • getXid

        public abstract Xid getXid​(byte[] tid)
        Returns the foreign Xid that is mapped to the specified WS-AT transaction Id.
        Parameters:
        tid - A foreign WS-AT tid.
        Returns:
        The foreign Xid corresponding to the tid.
      • getTid

        public abstract byte[] getTid​(Xid xid)
        Returns the foreign WS-AT transaction Id that is mapped to the foreign Xid.
        Parameters:
        xid - A foreign Xid that was created from the foreign tid.
        Returns:
        The foreign tid corresponding to the foreign Xid.
      • remove

        public abstract Xid remove​(byte[] tid)
        Removes the foreign WS-AT tid to Xid mapping
        Parameters:
        tid - A foreign WS-AT transaction Id.
        Returns:
        The mapped foreign Xid, or null if no mapping exists
      • remove

        public abstract byte[] remove​(Xid xid)
        Removes the foreign WS-AT tid to Xid mapping
        Parameters:
        xid - A foreign Xid that is mapped to a foreign tid.
        Returns:
        The mapped tid, or null if no mapping exists.