Class OracleXAResource

  • All Implemented Interfaces:
    XAResource

    public class OracleXAResource
    extends XAResourceWrapper
    This implements workaround for Oracle XAResource. Oracle's 8.1.7 XAResource implementation doesn't work fine while recovery. This class fires sql statements to achieve same.
    Version:
    1.0
    Author:
    Bala Dutt
    • Constructor Detail

      • OracleXAResource

        public OracleXAResource()
    • Method Detail

      • getInstance

        public XAResourceWrapper getInstance()
        Description copied from class: XAResourceWrapper
        public Xid[] recover(int flag) throws XAException { throw new XAException("This is to be implemented by sub classes"); } public void commit(Xid xid, boolean flag) throws XAException{ throw new XAException("This is to be implemented by sub classes"); } public void rollback(Xid xid) throws XAException{ throw new XAException("This is to be implemented by sub classes"); }
        Specified by:
        getInstance in class XAResourceWrapper
      • recover

        public Xid[] recover​(int flag)
                      throws XAException
        Recovers list of xids in transaction table. Recover on oracle ignores flags sent to it, this method takes care of flags in addition to calling recoverList for xid list.
        Specified by:
        recover in interface XAResource
        Specified by:
        recover in class XAResourceWrapper
        Parameters:
        flag - an int value
        Returns:
        a Xid[] value
        Throws:
        XAException - if an error occurs