public final class EhCacheXAResourceProducer extends ResourceBean implements XAResourceProducer
Copyright 2003-2010 Terracotta, Inc.
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Release this
XAResourceProducer's internal resources. |
XAStatefulHolder |
createPooledConnection(java.lang.Object xaFactory,
ResourceBean bean)
Create a
XAStatefulHolder that will be placed in an XAPool. |
void |
endRecovery()
Release internal resources held after call to
startRecovery(). |
XAResourceHolder |
findXAResourceHolder(javax.transaction.xa.XAResource xaResource)
Find in the
XAResourceHolders created by this XAResourceProducer the one which this
XAResource belongs to. |
javax.naming.Reference |
getReference() |
void |
init()
Initialize this
XAResourceProducer's internal resources. |
static void |
registerXAResource(java.lang.String uniqueName,
javax.transaction.xa.XAResource xaResource)
Register an XAResource of a cache with BTM.
|
void |
setFailed(boolean failed)
Mark this resource producer as failed or not.
|
XAResourceHolderState |
startRecovery()
Prepare the recoverable
XAResource producer for recovery. |
java.lang.String |
toString() |
static void |
unregisterXAResource(java.lang.String uniqueName,
javax.transaction.xa.XAResource xaResource)
Unregister an XAResource of a cache from BTM.
|
getAcquireIncrement, getAcquisitionInterval, getAcquisitionTimeout, getAllowLocalTransactions, getApplyTransactionTimeout, getAutomaticEnlistingEnabled, getClassName, getDeferConnectionRelease, getDriverProperties, getIgnoreRecoveryFailures, getMaxIdleTime, getMaxPoolSize, getMinPoolSize, getShareTransactionConnections, getTwoPcOrderingPosition, getUniqueName, getUseTmJoin, incCreatedResourcesCounter, isDisabled, setAcquireIncrement, setAcquisitionInterval, setAcquisitionTimeout, setAllowLocalTransactions, setApplyTransactionTimeout, setAutomaticEnlistingEnabled, setClassName, setDeferConnectionRelease, setDisabled, setDriverProperties, setIgnoreRecoveryFailures, setMaxIdleTime, setMaxPoolSize, setMinPoolSize, setShareTransactionConnections, setTwoPcOrderingPosition, setUniqueName, setUseTmJoinclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetUniqueNamepublic static void registerXAResource(java.lang.String uniqueName,
javax.transaction.xa.XAResource xaResource)
uniqueName - the uniqueName of this XAResourceProducer, usually the cache's namexaResource - the XAResource to be registeredpublic static void unregisterXAResource(java.lang.String uniqueName,
javax.transaction.xa.XAResource xaResource)
uniqueName - the uniqueName of this XAResourceProducer, usually the cache's namexaResource - the XAResource to be registeredpublic XAResourceHolderState startRecovery() throws RecoveryException
XAResource producer for recovery.startRecovery in interface XAResourceProducerXAResourceHolderState object that can be used to call recover().RecoveryException - thrown when a XAResourceHolderState cannot be acquired.public void endRecovery()
throws RecoveryException
startRecovery().endRecovery in interface XAResourceProducerRecoveryException - thrown when an error occured while releasing reserved resources.public void setFailed(boolean failed)
setFailed in interface XAResourceProducerfailed - true is the resource must be considered failed, false it it must be considered sane.public XAResourceHolder findXAResourceHolder(javax.transaction.xa.XAResource xaResource)
XAResourceHolders created by this XAResourceProducer the one which this
XAResource belongs to.findXAResourceHolder in interface XAResourceProducerxaResource - the XAResource to look for.XAResourceHolder or null if the XAResource does not belong to this
XAResourceProducer.public void init()
XAResourceProducer's internal resources.init in interface XAResourceProducerpublic void close()
XAResourceProducer's internal resources.close in interface XAResourceProducerpublic XAStatefulHolder createPooledConnection(java.lang.Object xaFactory, ResourceBean bean) throws java.lang.Exception
XAStatefulHolder that will be placed in an XAPool.createPooledConnection in interface XAResourceProducerxaFactory - the vendor's resource-specific XA factory.bean - the resource-specific bean describing the resource parameters.XAStatefulHolder that will be placed in an XAPool.java.lang.Exception - thrown when the XAStatefulHolder cannot be created.public javax.naming.Reference getReference()
throws javax.naming.NamingException
getReference in interface javax.naming.Referenceablejavax.naming.NamingExceptionpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2006-2019 Bitronix Software. All Rights Reserved.