bitronix.tm.resource.common
Class XAPool
java.lang.Object
bitronix.tm.resource.common.XAPool
- All Implemented Interfaces:
- StateChangeListener
public class XAPool
- extends java.lang.Object
- implements StateChangeListener
Generic XA pool. 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.
- Author:
- lorban
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
XAPool
public XAPool(XAResourceProducer xaResourceProducer,
ResourceBean bean)
throws java.lang.Exception
- Throws:
java.lang.Exception
getXAFactory
public java.lang.Object getXAFactory()
setFailed
public void setFailed(boolean failed)
isFailed
public boolean isFailed()
getConnectionHandle
public java.lang.Object getConnectionHandle()
throws java.lang.Exception
- Throws:
java.lang.Exception
getConnectionHandle
public java.lang.Object getConnectionHandle(boolean recycle)
throws java.lang.Exception
- Throws:
java.lang.Exception
close
public void close()
totalPoolSize
public long totalPoolSize()
inPoolSize
public long inPoolSize()
stateChanged
public void stateChanged(XAStatefulHolder source,
int oldState,
int newState)
- Description copied from interface:
StateChangeListener
- Fired when the internal state of a
XAStatefulHolder has changed.
- Specified by:
stateChanged in interface StateChangeListener
- Parameters:
source - the XAStatefulHolder changing state.oldState - the old state of the XAStatefulHolder.newState - the new state of the XAStatefulHolder.
stateChanging
public void stateChanging(XAStatefulHolder source,
int currentState,
int futureState)
- Description copied from interface:
StateChangeListener
- Fired before the internal state of a
XAStatefulHolder has changed.
- Specified by:
stateChanging in interface StateChangeListener
- Parameters:
source - the XAStatefulHolder changing state.currentState - the current state of the XAStatefulHolder.futureState - the future state of the XAStatefulHolder.
findXAResourceHolder
public XAResourceHolder findXAResourceHolder(javax.transaction.xa.XAResource xaResource)
getNextShrinkDate
public java.util.Date getNextShrinkDate()
shrink
public void shrink()
throws java.lang.Exception
- Throws:
java.lang.Exception
reset
public void reset()
throws java.lang.Exception
- Throws:
java.lang.Exception
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
Copyright © 2006-2018 Bitronix Software. All Rights Reserved.