public class XAPool extends java.lang.Object implements StateChangeListener
XAStatefulHolder instances are created by the XAPool out of a
XAResourceProducer. Those objects are then pooled and can be retrieved and/or recycled by the pool
depending on the running XA transaction's and the XAStatefulHolder's states.| Constructor and Description |
|---|
XAPool(XAResourceProducer xaResourceProducer,
ResourceBean bean) |
XAPool(XAResourceProducer xaResourceProducer,
ResourceBean bean,
java.lang.Object[] factoryConstructorArgs) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
XAResourceHolder |
findXAResourceHolder(javax.transaction.xa.XAResource xaResource) |
java.lang.Object |
getConnectionHandle() |
java.lang.Object |
getConnectionHandle(boolean recycle) |
java.util.Date |
getNextShrinkDate() |
java.lang.Object |
getXAFactory() |
long |
inPoolSize() |
boolean |
isFailed() |
void |
reset() |
void |
setFailed(boolean failed) |
void |
shrink() |
void |
stateChanged(XAStatefulHolder source,
int oldState,
int newState)
Fired when the internal state of a
XAStatefulHolder has changed. |
void |
stateChanging(XAStatefulHolder source,
int currentState,
int futureState)
Fired before the internal state of a
XAStatefulHolder has changed. |
java.lang.String |
toString() |
long |
totalPoolSize() |
public XAPool(XAResourceProducer xaResourceProducer, ResourceBean bean) throws java.lang.Exception
java.lang.Exceptionpublic XAPool(XAResourceProducer xaResourceProducer, ResourceBean bean, java.lang.Object[] factoryConstructorArgs) throws java.lang.Exception
java.lang.Exceptionpublic java.lang.Object getXAFactory()
public void setFailed(boolean failed)
public boolean isFailed()
public java.lang.Object getConnectionHandle()
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.Object getConnectionHandle(boolean recycle)
throws java.lang.Exception
java.lang.Exceptionpublic void close()
public long totalPoolSize()
public long inPoolSize()
public void stateChanged(XAStatefulHolder source, int oldState, int newState)
StateChangeListenerXAStatefulHolder has changed.stateChanged in interface StateChangeListenersource - the XAStatefulHolder changing state.oldState - the old state of the XAStatefulHolder.newState - the new state of the XAStatefulHolder.public void stateChanging(XAStatefulHolder source, int currentState, int futureState)
StateChangeListenerXAStatefulHolder has changed.stateChanging in interface StateChangeListenersource - the XAStatefulHolder changing state.currentState - the current state of the XAStatefulHolder.futureState - the future state of the XAStatefulHolder.public XAResourceHolder findXAResourceHolder(javax.transaction.xa.XAResource xaResource)
public java.util.Date getNextShrinkDate()
public void shrink()
throws java.lang.Exception
java.lang.Exceptionpublic void reset()
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2006-2021 Bitronix Software. All Rights Reserved.