org.infinispan.transaction.xa
Class TransactionXaAdapter
java.lang.Object
org.infinispan.transaction.xa.TransactionXaAdapter
- All Implemented Interfaces:
- XAResource
public class TransactionXaAdapter
- extends Object
- implements XAResource
This acts both as an local CacheTransaction
and implementor of an XAResource
that will be called by tx manager on various tx stages.
- Since:
- 4.0
- Author:
- Mircea.Markus@jboss.com
Fields inherited from interface javax.transaction.xa.XAResource |
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY |
TransactionXaAdapter
public TransactionXaAdapter(LocalXaTransaction localTransaction,
TransactionTable txTable,
Configuration configuration,
InvocationContextContainer icc,
RecoveryManager rm,
TransactionCoordinator txCoordinator)
prepare
public int prepare(Xid externalXid)
throws XAException
- This can be call for any transaction object. See Section 3.4.6 (Resource Sharing) from JTA spec v1.1.
- Specified by:
prepare
in interface XAResource
- Throws:
XAException
commit
public void commit(Xid externalXid,
boolean isOnePhase)
throws XAException
- Same comment as for
prepare(javax.transaction.xa.Xid)
applies for commit.
- Specified by:
commit
in interface XAResource
- Throws:
XAException
rollback
public void rollback(Xid externalXid)
throws XAException
- Same comment as for
prepare(javax.transaction.xa.Xid)
applies for commit.
- Specified by:
rollback
in interface XAResource
- Throws:
XAException
start
public void start(Xid externalXid,
int i)
throws XAException
- Specified by:
start
in interface XAResource
- Throws:
XAException
end
public void end(Xid externalXid,
int i)
throws XAException
- Specified by:
end
in interface XAResource
- Throws:
XAException
forget
public void forget(Xid externalXid)
throws XAException
- Specified by:
forget
in interface XAResource
- Throws:
XAException
getTransactionTimeout
public int getTransactionTimeout()
throws XAException
- Specified by:
getTransactionTimeout
in interface XAResource
- Throws:
XAException
isSameRM
public boolean isSameRM(XAResource xaResource)
throws XAException
- Specified by:
isSameRM
in interface XAResource
- Throws:
XAException
recover
public Xid[] recover(int flag)
throws XAException
- Specified by:
recover
in interface XAResource
- Throws:
XAException
setTransactionTimeout
public boolean setTransactionTimeout(int i)
throws XAException
- Specified by:
setTransactionTimeout
in interface XAResource
- Throws:
XAException
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
getLocalTransaction
public LocalXaTransaction getLocalTransaction()
Copyright © 2011 JBoss, a division of Red Hat. All Rights Reserved.