com.caucho.sql
Class DisjointXAResource

java.lang.Object
  extended by com.caucho.sql.DisjointXAResource
All Implemented Interfaces:
XAResource

public class DisjointXAResource
extends java.lang.Object
implements XAResource

Represents an XA resource which should have isSameRM return false.


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
DisjointXAResource(XAResource resource)
          Creates a new DisjointXAResource
 
Method Summary
 void commit(Xid xid, boolean onePhase)
          Commits the resource
 void end(Xid xid, int flags)
          Starts the resource.
 void forget(Xid xid)
          Forgets the transaction
 int getTransactionTimeout()
          Gets the transaction timeout.
 XAResource getXAResource()
          Returns the underlying resource.
 boolean isSameRM(XAResource resource)
          Returns true if the underlying RM is the same.
 int prepare(Xid xid)
          Rolls the resource back
 Xid[] recover(int flags)
          Rolls the resource back
 void rollback(Xid xid)
          Rolls the resource back
 boolean setTransactionTimeout(int seconds)
          Sets the transaction timeout.
 void start(Xid xid, int flags)
          Starts the resource.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DisjointXAResource

public DisjointXAResource(XAResource resource)
Creates a new DisjointXAResource

Method Detail

getXAResource

public XAResource getXAResource()
Returns the underlying resource.


setTransactionTimeout

public boolean setTransactionTimeout(int seconds)
                              throws XAException
Sets the transaction timeout.

Specified by:
setTransactionTimeout in interface XAResource
Throws:
XAException

getTransactionTimeout

public int getTransactionTimeout()
                          throws XAException
Gets the transaction timeout.

Specified by:
getTransactionTimeout in interface XAResource
Throws:
XAException

isSameRM

public boolean isSameRM(XAResource resource)
                 throws XAException
Returns true if the underlying RM is the same.

Specified by:
isSameRM in interface XAResource
Throws:
XAException

start

public void start(Xid xid,
                  int flags)
           throws XAException
Starts the resource.

Specified by:
start in interface XAResource
Throws:
XAException

end

public void end(Xid xid,
                int flags)
         throws XAException
Starts the resource.

Specified by:
end in interface XAResource
Throws:
XAException

prepare

public int prepare(Xid xid)
            throws XAException
Rolls the resource back

Specified by:
prepare in interface XAResource
Throws:
XAException

commit

public void commit(Xid xid,
                   boolean onePhase)
            throws XAException
Commits the resource

Specified by:
commit in interface XAResource
Throws:
XAException

rollback

public void rollback(Xid xid)
              throws XAException
Rolls the resource back

Specified by:
rollback in interface XAResource
Throws:
XAException

recover

public Xid[] recover(int flags)
              throws XAException
Rolls the resource back

Specified by:
recover in interface XAResource
Throws:
XAException

forget

public void forget(Xid xid)
            throws XAException
Forgets the transaction

Specified by:
forget in interface XAResource
Throws:
XAException

toString

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