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 void
commit(Xid xid, boolean flag)
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"); }Xid[]
recover(int flag)
Recovers list of xids in transaction table.void
rollback(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:XAResourceWrapper
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"); }- Specified by:
getInstance
in 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:
recover
in interfaceXAResource
- Specified by:
recover
in classXAResourceWrapper
- Parameters:
flag
- anint
value- Returns:
- a
Xid[]
value - Throws:
XAException
- if an error occurs
-
commit
public void commit(Xid xid, boolean flag) throws XAException
- Specified by:
commit
in interfaceXAResource
- Specified by:
commit
in classXAResourceWrapper
- Throws:
XAException
-
rollback
public void rollback(Xid xid) throws XAException
- Specified by:
rollback
in interfaceXAResource
- Specified by:
rollback
in classXAResourceWrapper
- Throws:
XAException
-
-