Class SPIXAResource

java.lang.Object
com.ibm.jakarta.connector2.cics.SPIXAResource
All Implemented Interfaces:
XAResource

public final class SPIXAResource extends Object implements XAResource
  • Field Details

  • Constructor Details

    • SPIXAResource

      public SPIXAResource()
  • Method Details

    • start

      public void start(Xid xid, int flags) throws XAException
      Signals the start of a transaction branch specified in xid.
      Specified by:
      start in interface XAResource
      Parameters:
      xid - A global transaction identifier to be associated with the resource.
      flags - One of TMNOFLAGS, TMJOIN, or TMRESUME
      Throws:
      XAException - Thrown if the start call fails
    • end

      public void end(Xid xid, int flags) throws XAException
      Signals the end of a transaction branch specified in xid.
      Specified by:
      end in interface XAResource
      Parameters:
      xid - A global transaction identifier to be associated with the resource.
      flags - One of TMSUCCESS, TMFAIL, or TMSUSPEND
      Throws:
      XAException - Thrown if the end call fails
    • prepare

      public int prepare(Xid xid) throws XAException
      Asks the resource manager to prepare for a transaction commit of the transaction specified in xid.
      Specified by:
      prepare in interface XAResource
      Parameters:
      xid - A global transaction identifier to be associated with the resource.
      Returns:
      XAResource.XA_OK If the prepare call is successful
      Throws:
      XAException - Thrown if the prepare call fails, indicating we wish to rollback.
    • commit

      public void commit(Xid xid, boolean onePhase) throws XAException
      Asks the resource manager to commit the transaction branch specified in xid.
      Specified by:
      commit in interface XAResource
      Parameters:
      xid - The global transaction identifier.
      onePhase - Indicate whether the global transaction has be optimized to a one phase transaction.
      Throws:
      XAException - Thrown if the commit call fails.
    • rollback

      public void rollback(Xid xid) throws XAException
      Asks the resource manager to rollback the transaction branch specified in xid.
      Specified by:
      rollback in interface XAResource
      Parameters:
      xid - The global transaction identifier.
      Throws:
      XAException - Thrown if the rollback call fails.
    • forget

      public void forget(Xid xid) throws XAException
      Asks the resource manager to forget the transaction branch specified in xid.
      Specified by:
      forget in interface XAResource
      Parameters:
      xid - The global transaction identifier.
      Throws:
      XAException - Thrown if forget call fails.
    • recover

      public Xid[] recover(int flag) throws XAException
      Obtains a list of prepared transaction branches from the resource manager. If the start flag is received then all prepared transaction branches will be returned. If the start flag is not received an empty array will be returned.
      Specified by:
      recover in interface XAResource
      Parameters:
      flag - One of TMSTARTRSCAN, TMENDRSCAN, TMNOFLAGS. TMNOFLAGS
      Throws:
      XAException - Thrown if recover call fails.
    • isSameRM

      public boolean isSameRM(XAResource otherXA)
      Specified by:
      isSameRM in interface XAResource
      Parameters:
      otherXA -
      Returns:
      false always.
    • getTransactionTimeout

      public int getTransactionTimeout()
      Transaction timeouts not supported by ECI Connector
      Specified by:
      getTransactionTimeout in interface XAResource
      Returns:
      0 always.
    • setTransactionTimeout

      public boolean setTransactionTimeout(int newTransactionTimeout)
      Transaction timeouts not supported by ECI Connector
      Specified by:
      setTransactionTimeout in interface XAResource
      Parameters:
      newTransactionTimeout - Not used by the ECI Connector.
      Returns:
      false always.