com.caucho.tools.profiler
Class XAResourceWrapper

java.lang.Object
  extended by com.caucho.tools.profiler.XAResourceWrapper
All Implemented Interfaces:
XAResource

public class XAResourceWrapper
extends java.lang.Object
implements XAResource


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
XAResourceWrapper(ProfilerPoint profilerPoint, XAResource xaResource)
           
 
Method Summary
 void commit(Xid xid, boolean b)
          Called to commit.
 void end(Xid xid, int i)
          Called when the resource is is done with a transaction.
 void forget(Xid xid)
          Called to forget an Xid that had a heuristic commit.
 int getTransactionTimeout()
          Gets the transaction timeout in seconds.
 boolean isSameRM(XAResource xaResource)
          Returns true if the specified resource has the same RM.
 int prepare(Xid xid)
          Called to start the first phase of the commit.
 Xid[] recover(int i)
          Called to find Xid's that need recovery.
 void rollback(Xid xid)
          Called to roll back.
 boolean setTransactionTimeout(int i)
          Sets the transaction timeout in seconds.
 void start(Xid xid, int i)
          Called when the resource is associated with a transaction.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XAResourceWrapper

public XAResourceWrapper(ProfilerPoint profilerPoint,
                         XAResource xaResource)
Method Detail

commit

public void commit(Xid xid,
                   boolean b)
            throws XAException
Description copied from interface: XAResource
Called to commit.

Specified by:
commit in interface XAResource
Throws:
XAException

end

public void end(Xid xid,
                int i)
         throws XAException
Description copied from interface: XAResource
Called when the resource is is done with a transaction.

Specified by:
end in interface XAResource
Throws:
XAException

forget

public void forget(Xid xid)
            throws XAException
Description copied from interface: XAResource
Called to forget an Xid that had a heuristic commit.

Specified by:
forget in interface XAResource
Throws:
XAException

getTransactionTimeout

public int getTransactionTimeout()
                          throws XAException
Description copied from interface: XAResource
Gets the transaction timeout in seconds.

Specified by:
getTransactionTimeout in interface XAResource
Throws:
XAException

isSameRM

public boolean isSameRM(XAResource xaResource)
                 throws XAException
Description copied from interface: XAResource
Returns true if the specified resource has the same RM.

Specified by:
isSameRM in interface XAResource
Throws:
XAException

prepare

public int prepare(Xid xid)
            throws XAException
Description copied from interface: XAResource
Called to start the first phase of the commit.

Specified by:
prepare in interface XAResource
Throws:
XAException

recover

public Xid[] recover(int i)
              throws XAException
Description copied from interface: XAResource
Called to find Xid's that need recovery.

Specified by:
recover in interface XAResource
Throws:
XAException

rollback

public void rollback(Xid xid)
              throws XAException
Description copied from interface: XAResource
Called to roll back.

Specified by:
rollback in interface XAResource
Throws:
XAException

setTransactionTimeout

public boolean setTransactionTimeout(int i)
                              throws XAException
Description copied from interface: XAResource
Sets the transaction timeout in seconds.

Specified by:
setTransactionTimeout in interface XAResource
Throws:
XAException

start

public void start(Xid xid,
                  int i)
           throws XAException
Description copied from interface: XAResource
Called when the resource is associated with a transaction.

Specified by:
start in interface XAResource
Throws:
XAException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object