com.sun.enterprise.transaction.jts.recovery
Class OracleXAResource

java.lang.Object
  extended by com.sun.enterprise.transaction.api.XAResourceWrapper
      extended by 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
OracleXAResource()
           
 
Method Summary
 void commit(Xid xid, boolean flag)
           
 XAResourceWrapper getInstance()
           
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OracleXAResource

public OracleXAResource()
Method Detail

getInstance

public XAResourceWrapper getInstance()
Specified by:
getInstance in class XAResourceWrapper

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 interface XAResource
Specified by:
recover in class XAResourceWrapper
Parameters:
flag - an int 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 interface XAResource
Specified by:
commit in class XAResourceWrapper
Throws:
XAException

rollback

public void rollback(Xid xid)
              throws XAException
Specified by:
rollback in interface XAResource
Specified by:
rollback in class XAResourceWrapper
Throws:
XAException


Copyright © 2012 GlassFish Community. All Rights Reserved.