Class BridgeXAResource

java.lang.Object
org.jboss.jbossts.txbridge.outbound.BridgeXAResource
All Implemented Interfaces:
Serializable, XAResource

public class BridgeXAResource extends Object implements XAResource, Serializable
Provides method call mapping between JTA parent coordinator and WS-AT subordinate transaction.
Author:
jonathan.halliday@redhat.com, 2009-02-10
See Also:
  • Constructor Details

    • BridgeXAResource

      public BridgeXAResource(Uid externalTxId, org.jboss.jbossts.xts.bridge.at.BridgeWrapper bridgeWrapper)
      Create a new XAResource which wraps the subordinate WS-AT transaction.
      Parameters:
      externalTxId - the parent JTA transaction identifier.
      bridgeWrapper - the control for the subordinate WS-AT transaction.
  • Method Details

    • prepare

      public int prepare(Xid xid) throws XAException
      Ask 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
      Returns:
      A value indicating the resource manager's vote on the outcome of the transaction
      Throws:
      XAException
    • cleanupRecoveredXAResources

      public static void cleanupRecoveredXAResources()
      Release any BridgeXAResource instances that have been driven through to completion by their parent JTA transaction.
    • isAwaitingRecovery

      public static boolean isAwaitingRecovery(String bridgeWrapperId)
      Determine if the specified BridgeWrapper is awaiting recovery or not.
      Parameters:
      bridgeWrapperId - the Id to search for.
      Returns:
      true if the BridgeWrapper is known to be awaiting recovery, false otherwise.
    • rollback

      public void rollback(Xid xid) throws XAException
      Informs the resource manager to roll back work done on behalf of a transaction branch.
      Specified by:
      rollback in interface XAResource
      Parameters:
      xid - A global transaction identifier
      Throws:
      XAException
    • commit

      public void commit(Xid xid, boolean onePhase) throws XAException
      Commits the global transaction specified by xid.
      Specified by:
      commit in interface XAResource
      Parameters:
      xid - A global transaction identifier
      onePhase -
      Throws:
      XAException
    • start

      public void start(Xid xid, int flags) throws XAException
      Starts work on behalf of a transaction branch specified in xid.
      Specified by:
      start in interface XAResource
      Parameters:
      xid - A global transaction identifier
      flags -
      Throws:
      XAException
    • end

      public void end(Xid xid, int flags) throws XAException
      Ends the work performed on behalf of a transaction branch.
      Specified by:
      end in interface XAResource
      Parameters:
      xid - A global transaction identifier
      flags -
      Throws:
      XAException
    • isSameRM

      public boolean isSameRM(XAResource xaResource) throws XAException
      Specified by:
      isSameRM in interface XAResource
      Throws:
      XAException
    • forget

      public void forget(Xid xid) throws XAException
      Specified by:
      forget in interface XAResource
      Throws:
      XAException
    • recover

      public Xid[] recover(int flag) throws XAException
      Obtains a list of prepared transaction branches from a resource manager.
      Specified by:
      recover in interface XAResource
      Parameters:
      flag -
      Returns:
      the in doubt Xids
      Throws:
      XAException
    • setTransactionTimeout

      public boolean setTransactionTimeout(int seconds) throws XAException
      Sets the current transaction timeout value for this XAResource instance.
      Specified by:
      setTransactionTimeout in interface XAResource
      Parameters:
      seconds - - The transaction timeout value in seconds.
      Returns:
      true if the transaction timeout value is set successfully; otherwise false.
      Throws:
      XAException
    • getTransactionTimeout

      public int getTransactionTimeout() throws XAException
      Obtains the current transaction timeout value set for this XAResource instance.
      Specified by:
      getTransactionTimeout in interface XAResource
      Returns:
      the transaction timeout value in seconds.
      Throws:
      XAException
    • isAwaitingRecovery

      public boolean isAwaitingRecovery()