Class XAHelper


  • public class XAHelper
    extends java.lang.Object
    Some useful utility routines.
    • Constructor Summary

      Constructors 
      Constructor Description
      XAHelper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String printXAErrorCode​(javax.transaction.xa.XAException e)
      Print a human-readable version of the XAException.
      static boolean sameTransaction​(javax.transaction.xa.Xid x1, javax.transaction.xa.Xid x2)
      Compares two Xid instances at the gtid level only.
      static boolean sameXID​(javax.transaction.xa.Xid x1, javax.transaction.xa.Xid x2)
      Compares two Xid instances.
      static java.lang.String xidToString​(javax.transaction.xa.Xid xid)
      get a string representing anyones Xid similar too, but not the same as OTS_Transaction/xa/XID.toString()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XAHelper

        public XAHelper()
    • Method Detail

      • printXAErrorCode

        public static java.lang.String printXAErrorCode​(javax.transaction.xa.XAException e)
        Print a human-readable version of the XAException.
      • sameXID

        public static boolean sameXID​(javax.transaction.xa.Xid x1,
                                      javax.transaction.xa.Xid x2)
        Compares two Xid instances.
        Parameters:
        x1 - first Xid
        x2 - second Xid
        Returns:
        true if the two instances are the same, false otherwise.
      • sameTransaction

        public static boolean sameTransaction​(javax.transaction.xa.Xid x1,
                                              javax.transaction.xa.Xid x2)
        Compares two Xid instances at the gtid level only.
        Parameters:
        x1 - first Xid
        x2 - second Xid
        Returns:
        true if the two instances are the same, false otherwise.
      • xidToString

        public static java.lang.String xidToString​(javax.transaction.xa.Xid xid)
        get a string representing anyones Xid similar too, but not the same as OTS_Transaction/xa/XID.toString()