public class TransactionXaAdapter extends AbstractEnlistmentAdapter implements XAResource
CacheTransaction
and implementor of an XAResource
that will be called by tx manager on various tx stages.txCoordinator
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY
Constructor and Description |
---|
TransactionXaAdapter(LocalXaTransaction localTransaction,
TransactionTable txTable,
RecoveryManager rm,
TransactionCoordinator txCoordinator,
CommandsFactory commandsFactory,
RpcManager rpcManager,
ClusteringDependentLogic clusteringDependentLogic,
Configuration configuration,
String cacheName) |
TransactionXaAdapter(TransactionTable txTable,
RecoveryManager rm,
TransactionCoordinator txCoordinator,
CommandsFactory commandsFactory,
RpcManager rpcManager,
ClusteringDependentLogic clusteringDependentLogic,
Configuration configuration,
String cacheName) |
Modifier and Type | Method and Description |
---|---|
void |
commit(Xid externalXid,
boolean isOnePhase)
Same comment as for
prepare(javax.transaction.xa.Xid) applies for commit. |
void |
end(Xid externalXid,
int i) |
boolean |
equals(Object o) |
void |
forget(Xid externalXid) |
LocalXaTransaction |
getLocalTransaction() |
int |
getTransactionTimeout() |
boolean |
isSameRM(XAResource xaResource)
the only situation in which it returns true is when the other xa resource pertains to the same cache, on
the same node.
|
int |
prepare(Xid externalXid)
This can be call for any transaction object.
|
Xid[] |
recover(int flag) |
void |
rollback(Xid externalXid)
Same comment as for
prepare(javax.transaction.xa.Xid) applies for commit. |
boolean |
setTransactionTimeout(int i) |
void |
start(Xid externalXid,
int i) |
String |
toString() |
hashCode, releaseLocksForCompletedTransaction
public TransactionXaAdapter(LocalXaTransaction localTransaction, TransactionTable txTable, RecoveryManager rm, TransactionCoordinator txCoordinator, CommandsFactory commandsFactory, RpcManager rpcManager, ClusteringDependentLogic clusteringDependentLogic, Configuration configuration, String cacheName)
public TransactionXaAdapter(TransactionTable txTable, RecoveryManager rm, TransactionCoordinator txCoordinator, CommandsFactory commandsFactory, RpcManager rpcManager, ClusteringDependentLogic clusteringDependentLogic, Configuration configuration, String cacheName)
public int prepare(Xid externalXid) throws XAException
prepare
in interface XAResource
XAException
public void commit(Xid externalXid, boolean isOnePhase) throws XAException
prepare(javax.transaction.xa.Xid)
applies for commit.commit
in interface XAResource
XAException
public void rollback(Xid externalXid) throws XAException
prepare(javax.transaction.xa.Xid)
applies for commit.rollback
in interface XAResource
XAException
public void start(Xid externalXid, int i) throws XAException
start
in interface XAResource
XAException
public void end(Xid externalXid, int i) throws XAException
end
in interface XAResource
XAException
public void forget(Xid externalXid) throws XAException
forget
in interface XAResource
XAException
public int getTransactionTimeout() throws XAException
getTransactionTimeout
in interface XAResource
XAException
public boolean isSameRM(XAResource xaResource) throws XAException
isSameRM
in interface XAResource
XAException
public Xid[] recover(int flag) throws XAException
recover
in interface XAResource
XAException
public boolean setTransactionTimeout(int i) throws XAException
setTransactionTimeout
in interface XAResource
XAException
public LocalXaTransaction getLocalTransaction()
Copyright © 2014 JBoss, a division of Red Hat. All Rights Reserved.