com.caucho.ejb.hessian
Class HessianXAResource

java.lang.Object
  extended by com.caucho.ejb.hessian.HessianXAResource
All Implemented Interfaces:
XAResource

public class HessianXAResource
extends java.lang.Object
implements XAResource

Resource


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
HessianXAResource(java.lang.String url)
           
 
Method Summary
 void commit(Xid xid, boolean onephase)
          Called to commit.
 void end(Xid xid, int flags)
          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 xares)
          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 flag)
          Called to find Xid's that need recovery.
 void rollback(Xid xid)
          Called to roll back.
 boolean setTransactionTimeout(int seconds)
          Sets the transaction timeout in seconds.
 void start(Xid xid, int flags)
          Called when the resource is associated with a transaction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HessianXAResource

public HessianXAResource(java.lang.String url)
Method Detail

isSameRM

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

Specified by:
isSameRM in interface XAResource

start

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

Specified by:
start in interface XAResource
Throws:
XAException

end

public void end(Xid xid,
                int flags)
         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

setTransactionTimeout

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

Specified by:
setTransactionTimeout 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

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 flag)
              throws XAException
Description copied from interface: XAResource
Called to find Xid's that need recovery.

Specified by:
recover 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

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

commit

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

Specified by:
commit in interface XAResource
Throws:
XAException