com.sun.genericra
Class AbstractXAResourceType

java.lang.Object
  extended by com.sun.genericra.AbstractXAResourceType
All Implemented Interfaces:
XAResourceType, javax.transaction.xa.XAResource
Direct Known Subclasses:
InboundXAResourceProxy, SimpleXAResourceProxy, XAResourceProxy

public abstract class AbstractXAResourceType
extends java.lang.Object
implements XAResourceType, javax.transaction.xa.XAResource

AbstractXAResource object used by all XAResource objects in generic jms ra. The class contains the logic to compare the XAResource object, when RMPolicy is set to "One for Physical Connection".

Author:
Binod P.G

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
AbstractXAResourceType()
           
 
Method Summary
 boolean compare(XAResourceType type)
          If any one of the resources are configured with a policy of "OneForPhysicalConnection", then compare physical connection.
 javax.jms.Connection getConnection()
          Retrieves the physical JMS connection object.
 java.lang.String getRMPolicy()
          Retrieve the RM policy
abstract  java.lang.Object getWrappedObject()
          Abstract method declaration.
 void setConnection(javax.jms.Connection con)
          Set the physical jms connection object associated with this XAResource wrapper
 void setRMPolicy(java.lang.String policy)
          Set the Resource Manager policy
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.transaction.xa.XAResource
commit, end, forget, getTransactionTimeout, isSameRM, prepare, recover, rollback, setTransactionTimeout, start
 

Constructor Detail

AbstractXAResourceType

public AbstractXAResourceType()
Method Detail

getWrappedObject

public abstract java.lang.Object getWrappedObject()
Abstract method declaration.

Specified by:
getWrappedObject in interface XAResourceType

setConnection

public void setConnection(javax.jms.Connection con)
Set the physical jms connection object associated with this XAResource wrapper

Specified by:
setConnection in interface XAResourceType

getConnection

public javax.jms.Connection getConnection()
Retrieves the physical JMS connection object.

Specified by:
getConnection in interface XAResourceType

setRMPolicy

public void setRMPolicy(java.lang.String policy)
Set the Resource Manager policy

Specified by:
setRMPolicy in interface XAResourceType

getRMPolicy

public java.lang.String getRMPolicy()
Retrieve the RM policy

Specified by:
getRMPolicy in interface XAResourceType

compare

public boolean compare(XAResourceType type)
If any one of the resources are configured with a policy of "OneForPhysicalConnection", then compare physical connection. Otherwise, return true so that the actual XAResource wrapper can delegate it to the underlying XAResource implementation.

Specified by:
compare in interface XAResourceType