ehcache

net.sf.ehcache.transaction.manager.btm
Class GenericXAResourceProducer

java.lang.Object
  extended by bitronix.tm.resource.common.ResourceBean
      extended by net.sf.ehcache.transaction.manager.btm.GenericXAResourceProducer
All Implemented Interfaces:
bitronix.tm.resource.common.XAResourceProducer, java.io.Serializable, javax.naming.Referenceable

public class GenericXAResourceProducer
extends bitronix.tm.resource.common.ResourceBean
implements bitronix.tm.resource.common.XAResourceProducer

Author:
nelrahma
See Also:
Serialized Form

Constructor Summary
GenericXAResourceProducer()
           
 
Method Summary
 void close()
          
 bitronix.tm.resource.common.XAStatefulHolder createPooledConnection(java.lang.Object xaFactory, bitronix.tm.resource.common.ResourceBean bean)
          
 void endRecovery()
           
 bitronix.tm.resource.common.XAResourceHolder findXAResourceHolder(javax.transaction.xa.XAResource aXAResource)
          
 javax.naming.Reference getReference()
          PoolingDataSource must alway have a unique name so this method builds a reference to this object using the unique name as RefAddr.
 void init()
          Need to instantiate the XAResource.
static void registerXAResource(java.lang.String uniqueName, javax.transaction.xa.XAResource resource)
          Util for reflection based handling
 void setFailed(boolean failed)
          
 void setXAResource(javax.transaction.xa.XAResource resource)
           
 bitronix.tm.internal.XAResourceHolderState startRecovery()
           
 
Methods inherited from class bitronix.tm.resource.common.ResourceBean
getAcquireIncrement, getAcquisitionInterval, getAcquisitionTimeout, getAllowLocalTransactions, getApplyTransactionTimeout, getAutomaticEnlistingEnabled, getClassName, getDeferConnectionRelease, getDriverProperties, getMaxIdleTime, getMaxPoolSize, getMinPoolSize, getTwoPcOrderingPosition, getUniqueName, getUseTmJoin, incCreatedResourcesCounter, setAcquireIncrement, setAcquisitionInterval, setAcquisitionTimeout, setAllowLocalTransactions, setApplyTransactionTimeout, setAutomaticEnlistingEnabled, setClassName, setDeferConnectionRelease, setDriverProperties, setMaxIdleTime, setMaxPoolSize, setMinPoolSize, setTwoPcOrderingPosition, setUniqueName, setUseTmJoin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface bitronix.tm.resource.common.XAResourceProducer
getUniqueName
 

Constructor Detail

GenericXAResourceProducer

public GenericXAResourceProducer()
Method Detail

registerXAResource

public static void registerXAResource(java.lang.String uniqueName,
                                      javax.transaction.xa.XAResource resource)
Util for reflection based handling

Parameters:
uniqueName -
resource -

setXAResource

public void setXAResource(javax.transaction.xa.XAResource resource)
Parameters:
resource -

init

public void init()
Need to instantiate the XAResource.

Specified by:
init in interface bitronix.tm.resource.common.XAResourceProducer

startRecovery

public bitronix.tm.internal.XAResourceHolderState startRecovery()
                                                         throws bitronix.tm.recovery.RecoveryException
Specified by:
startRecovery in interface bitronix.tm.resource.common.XAResourceProducer
Throws:
bitronix.tm.recovery.RecoveryException

endRecovery

public void endRecovery()
                 throws bitronix.tm.recovery.RecoveryException
Specified by:
endRecovery in interface bitronix.tm.resource.common.XAResourceProducer
Throws:
bitronix.tm.recovery.RecoveryException

setFailed

public void setFailed(boolean failed)

Specified by:
setFailed in interface bitronix.tm.resource.common.XAResourceProducer

close

public void close()

Specified by:
close in interface bitronix.tm.resource.common.XAResourceProducer

createPooledConnection

public bitronix.tm.resource.common.XAStatefulHolder createPooledConnection(java.lang.Object xaFactory,
                                                                           bitronix.tm.resource.common.ResourceBean bean)
                                                                    throws java.lang.Exception

Specified by:
createPooledConnection in interface bitronix.tm.resource.common.XAResourceProducer
Throws:
java.lang.Exception

findXAResourceHolder

public bitronix.tm.resource.common.XAResourceHolder findXAResourceHolder(javax.transaction.xa.XAResource aXAResource)

Specified by:
findXAResourceHolder in interface bitronix.tm.resource.common.XAResourceProducer

getReference

public javax.naming.Reference getReference()
PoolingDataSource must alway have a unique name so this method builds a reference to this object using the unique name as RefAddr.

Specified by:
getReference in interface javax.naming.Referenceable
Returns:
a reference to this PoolingDataSource.

ehcache

true