Class XAResourceWrapper
- java.lang.Object
-
- com.sun.enterprise.transaction.api.XAResourceWrapper
-
- All Implemented Interfaces:
XAResource
- Direct Known Subclasses:
OracleXAResource,SybaseXAResource
public abstract class XAResourceWrapper extends Object implements XAResource
Wrappers over XAResources extend from this class. This class simply implements the the standard XAResource interface. In addition it holds the XAConnection which is set by XARecoveryManager and is used by deriving classes to implement workarounds. An example of class extending from this is OracleXARescource.- Version:
- 1.0
- Author:
- Bala Dutt
-
-
Field Summary
Fields Modifier and Type Field Description protected jakarta.resource.spi.ManagedConnectionm_xaconprotected Subjectsubject-
Fields inherited from interface javax.transaction.xa.XAResource
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY
-
-
Constructor Summary
Constructors Constructor Description XAResourceWrapper()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidcommit(Xid xid, boolean flag)voidend(Xid xid, int i)voidforget(Xid xid)abstract XAResourceWrappergetInstance()public Xid[] recover(int flag) throws XAException { throw new XAException("This is to be implemented by sub classes"); } public void commit(Xid xid, boolean flag) throws XAException{ throw new XAException("This is to be implemented by sub classes"); } public void rollback(Xid xid) throws XAException{ throw new XAException("This is to be implemented by sub classes"); }intgetTransactionTimeout()voidinit(jakarta.resource.spi.ManagedConnection xacon, Subject subject)booleanisSameRM(XAResource xaresource)intprepare(Xid xid)abstract Xid[]recover(int flag)abstract voidrollback(Xid xid)booleansetTransactionTimeout(int i)voidstart(Xid xid, int i)
-
-
-
Field Detail
-
m_xacon
protected jakarta.resource.spi.ManagedConnection m_xacon
-
subject
protected Subject subject
-
-
Method Detail
-
init
public void init(jakarta.resource.spi.ManagedConnection xacon, Subject subject)
-
end
public void end(Xid xid, int i) throws XAException
- Specified by:
endin interfaceXAResource- Throws:
XAException
-
forget
public void forget(Xid xid) throws XAException
- Specified by:
forgetin interfaceXAResource- Throws:
XAException
-
getTransactionTimeout
public int getTransactionTimeout() throws XAException- Specified by:
getTransactionTimeoutin interfaceXAResource- Throws:
XAException
-
isSameRM
public boolean isSameRM(XAResource xaresource) throws XAException
- Specified by:
isSameRMin interfaceXAResource- Throws:
XAException
-
prepare
public int prepare(Xid xid) throws XAException
- Specified by:
preparein interfaceXAResource- Throws:
XAException
-
setTransactionTimeout
public boolean setTransactionTimeout(int i) throws XAException- Specified by:
setTransactionTimeoutin interfaceXAResource- Throws:
XAException
-
start
public void start(Xid xid, int i) throws XAException
- Specified by:
startin interfaceXAResource- Throws:
XAException
-
recover
public abstract Xid[] recover(int flag) throws XAException
- Specified by:
recoverin interfaceXAResource- Throws:
XAException
-
commit
public abstract void commit(Xid xid, boolean flag) throws XAException
- Specified by:
commitin interfaceXAResource- Throws:
XAException
-
rollback
public abstract void rollback(Xid xid) throws XAException
- Specified by:
rollbackin interfaceXAResource- Throws:
XAException
-
getInstance
public abstract XAResourceWrapper getInstance()
public Xid[] recover(int flag) throws XAException { throw new XAException("This is to be implemented by sub classes"); } public void commit(Xid xid, boolean flag) throws XAException{ throw new XAException("This is to be implemented by sub classes"); } public void rollback(Xid xid) throws XAException{ throw new XAException("This is to be implemented by sub classes"); }
-
-