public class BridgeXAResource extends Object implements XAResource, Serializable
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY
Constructor and Description |
---|
BridgeXAResource(com.arjuna.ats.arjuna.common.Uid externalTxId,
BridgeWrapper bridgeWrapper)
Create a new XAResource which wraps the subordinate WS-AT transaction.
|
Modifier and Type | Method and Description |
---|---|
static void |
cleanupRecoveredXAResources()
Release any BridgeXAResource instances that have been driven
through to completion by their parent JTA transaction.
|
void |
commit(Xid xid,
boolean onePhase)
Commits the global transaction specified by xid.
|
void |
end(Xid xid,
int flags)
Ends the work performed on behalf of a transaction branch.
|
void |
forget(Xid xid)
Tells the resource manager to forget about a heuristic decision.
|
int |
getTransactionTimeout()
Obtains the current transaction timeout value set for this XAResource instance.
|
boolean |
isAwaitingRecovery() |
static boolean |
isAwaitingRecovery(String bridgeWrapperId)
Determine if the specified BridgeWrapper is awaiting recovery or not.
|
boolean |
isSameRM(XAResource xaResource)
Tells the caller if this resource has the same resource manager
as the argument resource.
|
int |
prepare(Xid xid)
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 |
rollback(Xid xid)
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 |
start(Xid xid,
int flags)
Starts work on behalf of a transaction branch specified in xid.
|
public BridgeXAResource(com.arjuna.ats.arjuna.common.Uid externalTxId, BridgeWrapper bridgeWrapper)
externalTxId
- the parent JTA transaction identifier.bridgeWrapper
- the control for the subordinate WS-AT transaction.public int prepare(Xid xid) throws XAException
prepare
in interface XAResource
xid
- A global transaction identifierXAException
public static void cleanupRecoveredXAResources()
public static boolean isAwaitingRecovery(String bridgeWrapperId)
bridgeWrapperId
- the Id to search for.public void rollback(Xid xid) throws XAException
rollback
in interface XAResource
xid
- A global transaction identifierXAException
public void commit(Xid xid, boolean onePhase) throws XAException
commit
in interface XAResource
xid
- A global transaction identifieronePhase
- XAException
public void start(Xid xid, int flags) throws XAException
start
in interface XAResource
xid
- A global transaction identifierflags
- XAException
public void end(Xid xid, int flags) throws XAException
end
in interface XAResource
xid
- A global transaction identifierflags
- XAException
public boolean isSameRM(XAResource xaResource) throws XAException
XAResource
start
method should be given the
XAResource.TMJOIN
flag.isSameRM
in interface XAResource
XAException
- If an error occurred.public void forget(Xid xid) throws XAException
XAResource
forget
in interface XAResource
xid
- The id of the transaction that was ended with a heuristic
decision.XAException
- If an error occurred.public Xid[] recover(int flag) throws XAException
recover
in interface XAResource
flag
- XAException
public boolean setTransactionTimeout(int seconds) throws XAException
setTransactionTimeout
in interface XAResource
seconds
- - The transaction timeout value in seconds.XAException
public int getTransactionTimeout() throws XAException
getTransactionTimeout
in interface XAResource
XAException
public boolean isAwaitingRecovery()
Copyright © 2016 JBoss by Red Hat. All rights reserved.