org.infinispan.transaction.xa
Class TransactionXaAdapter

java.lang.Object
  extended by 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

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
TransactionXaAdapter(LocalTransaction localTransaction, TransactionTable txTable, CommandsFactory commandsFactory, Configuration configuration, InterceptorChain invoker, InvocationContextContainer icc)
           
 
Method Summary
 void commit(Xid xid, boolean isOnePhase)
          Same comment as for prepare(javax.transaction.xa.Xid) applies for commit.
 void end(Xid xid, int i)
           
 boolean equals(Object o)
           
 void forget(Xid xid)
           
 int getTransactionTimeout()
           
 int hashCode()
           
 boolean isSameRM(XAResource xaResource)
           
 int prepare(Xid xid)
          This can be call for any transaction object.
 Xid[] recover(int i)
           
 void rollback(Xid xid)
          Same comment as for prepare(javax.transaction.xa.Xid) applies for commit.
 boolean setTransactionTimeout(int i)
           
 void start(Xid xid, int i)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TransactionXaAdapter

public TransactionXaAdapter(LocalTransaction localTransaction,
                            TransactionTable txTable,
                            CommandsFactory commandsFactory,
                            Configuration configuration,
                            InterceptorChain invoker,
                            InvocationContextContainer icc)
Method Detail

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

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

Google Analytics

Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.