Class BridgeXAResource
java.lang.Object
org.jboss.jbossts.txbridge.outbound.BridgeXAResource
- All Implemented Interfaces:
Serializable
,XAResource
Provides method call mapping between JTA parent coordinator and WS-AT subordinate transaction.
- Author:
- jonathan.halliday@redhat.com, 2009-02-10
- See Also:
-
Field Summary
Fields inherited from interface javax.transaction.xa.XAResource
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY
-
Constructor Summary
ConstructorDescriptionBridgeXAResource
(Uid externalTxId, org.jboss.jbossts.xts.bridge.at.BridgeWrapper bridgeWrapper) Create a new XAResource which wraps the subordinate WS-AT transaction. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Release any BridgeXAResource instances that have been driven through to completion by their parent JTA transaction.void
Commits the global transaction specified by xid.void
Ends the work performed on behalf of a transaction branch.void
int
Obtains the current transaction timeout value set for this XAResource instance.boolean
static boolean
isAwaitingRecovery
(String bridgeWrapperId) Determine if the specified BridgeWrapper is awaiting recovery or not.boolean
isSameRM
(XAResource xaResource) int
Ask the resource manager to prepare for a transaction commit of the transaction specified in xid.Xid[]
recover
(int flag) Obtains a list of prepared transaction branches from a resource manager.void
Informs the resource manager to roll back work done on behalf of a transaction branch.boolean
setTransactionTimeout
(int seconds) Sets the current transaction timeout value for this XAResource instance.void
Starts work on behalf of a transaction branch specified in xid.
-
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
Ask the resource manager to prepare for a transaction commit of the transaction specified in xid.- Specified by:
prepare
in interfaceXAResource
- 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
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
Informs the resource manager to roll back work done on behalf of a transaction branch.- Specified by:
rollback
in interfaceXAResource
- Parameters:
xid
- A global transaction identifier- Throws:
XAException
-
commit
Commits the global transaction specified by xid.- Specified by:
commit
in interfaceXAResource
- Parameters:
xid
- A global transaction identifieronePhase
-- Throws:
XAException
-
start
Starts work on behalf of a transaction branch specified in xid.- Specified by:
start
in interfaceXAResource
- Parameters:
xid
- A global transaction identifierflags
-- Throws:
XAException
-
end
Ends the work performed on behalf of a transaction branch.- Specified by:
end
in interfaceXAResource
- Parameters:
xid
- A global transaction identifierflags
-- Throws:
XAException
-
isSameRM
- Specified by:
isSameRM
in interfaceXAResource
- Throws:
XAException
-
forget
- Specified by:
forget
in interfaceXAResource
- Throws:
XAException
-
recover
Obtains a list of prepared transaction branches from a resource manager.- Specified by:
recover
in interfaceXAResource
- Parameters:
flag
-- Returns:
- the in doubt Xids
- Throws:
XAException
-
setTransactionTimeout
Sets the current transaction timeout value for this XAResource instance.- Specified by:
setTransactionTimeout
in interfaceXAResource
- Parameters:
seconds
- - The transaction timeout value in seconds.- Returns:
- true if the transaction timeout value is set successfully; otherwise false.
- Throws:
XAException
-
getTransactionTimeout
Obtains the current transaction timeout value set for this XAResource instance.- Specified by:
getTransactionTimeout
in interfaceXAResource
- Returns:
- the transaction timeout value in seconds.
- Throws:
XAException
-
isAwaitingRecovery
public boolean isAwaitingRecovery()
-