Class OracleXAResource
- java.lang.Object
-
- com.sun.enterprise.transaction.api.XAResourceWrapper
-
- com.sun.enterprise.transaction.jts.recovery.OracleXAResource
-
- All Implemented Interfaces:
XAResource
public class OracleXAResource extends XAResourceWrapper
This implements workaround for Oracle XAResource. Oracle's 8.1.7 XAResource implementation doesn't work fine while recovery. This class fires sql statements to achieve same.- Version:
- 1.0
- Author:
- Bala Dutt
-
-
Field Summary
-
Fields inherited from class com.sun.enterprise.transaction.api.XAResourceWrapper
m_xacon, subject
-
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 OracleXAResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcommit(Xid xid, boolean flag)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"); }Xid[]recover(int flag)Recovers list of xids in transaction table.voidrollback(Xid xid)-
Methods inherited from class com.sun.enterprise.transaction.api.XAResourceWrapper
end, forget, getTransactionTimeout, init, isSameRM, prepare, setTransactionTimeout, start
-
-
-
-
Method Detail
-
getInstance
public XAResourceWrapper getInstance()
Description copied from class:XAResourceWrapperpublic 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"); }- Specified by:
getInstancein classXAResourceWrapper
-
recover
public Xid[] recover(int flag) throws XAException
Recovers list of xids in transaction table. Recover on oracle ignores flags sent to it, this method takes care of flags in addition to calling recoverList for xid list.- Specified by:
recoverin interfaceXAResource- Specified by:
recoverin classXAResourceWrapper- Parameters:
flag- anintvalue- Returns:
- a
Xid[]value - Throws:
XAException- if an error occurs
-
commit
public void commit(Xid xid, boolean flag) throws XAException
- Specified by:
commitin interfaceXAResource- Specified by:
commitin classXAResourceWrapper- Throws:
XAException
-
rollback
public void rollback(Xid xid) throws XAException
- Specified by:
rollbackin interfaceXAResource- Specified by:
rollbackin classXAResourceWrapper- Throws:
XAException
-
-