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(LocalTransaction localTransaction,
TransactionTable txTable,
CommandsFactory commandsFactory,
Configuration configuration,
InterceptorChain invoker,
InvocationContextContainer icc)
prepare
public int prepare(Xid xid)
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 xid,
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 xid)
throws XAException
- Same comment as for
prepare(javax.transaction.xa.Xid) applies for commit.
- Specified by:
rollback in interface XAResource
- Throws:
XAException
rollbackImpl
public static void rollbackImpl(Xid xid,
CommandsFactory commandsFactory,
InvocationContextContainer icc,
InterceptorChain invoker,
TransactionTable txTable)
throws XAException
- Throws:
XAException
start
public void start(Xid xid,
int i)
throws XAException
- Specified by:
start in interface XAResource
- Throws:
XAException
end
public void end(Xid xid,
int i)
throws XAException
- Specified by:
end in interface XAResource
- Throws:
XAException
forget
public void forget(Xid xid)
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 i)
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
Copyright © 2011 JBoss, a division of Red Hat. All Rights Reserved.