public class JdbcPooledConnection extends AbstractXAResourceHolder<JdbcPooledConnection> implements StateChangeListener<JdbcPooledConnection>, JdbcPooledConnectionMBean
XAConnection implementation.XAStatefulHolder.State| Constructor and Description |
|---|
JdbcPooledConnection(PoolingDataSource poolingDataSource,
XAConnection xaConnection) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the physical connection that this
XAStatefulHolder represents. |
RecoveryXAResourceHolder |
createRecoveryXAResourceHolder() |
Date |
getAcquisitionDate() |
PreparedStatement |
getCachedStatement(LruStatementCache.CacheKey key)
Get a PreparedStatement from cache.
|
Object |
getConnectionHandle()
Create a disposable handler used to drive a pooled instance of
XAStatefulHolder. |
int |
getJdbcVersion() |
Date |
getLastReleaseDate()
Get the date at which this object was last released to the pool.
|
PoolingDataSource |
getPoolingDataSource() |
ResourceBean |
getResourceBean()
Get the ResourceBean which created this XAResourceHolder.
|
String |
getStateDescription() |
Collection<String> |
getTransactionGtridsCurrentlyHoldingThis() |
XAResource |
getXAResource()
Get the vendor's
XAResource implementation of the wrapped resource. |
List<JdbcPooledConnection> |
getXAResourceHolders()
Get the list of
XAResourceHolders created by this
XAStatefulHolder that are still open. |
PreparedStatement |
putCachedStatement(LruStatementCache.CacheKey key,
PreparedStatement statement)
Put a PreparedStatement in the cache.
|
Statement |
registerUncachedStatement(Statement stmt)
Register uncached statement so that it can be closed when the connection is put back in the pool.
|
boolean |
release() |
void |
stateChanged(JdbcPooledConnection source,
XAStatefulHolder.State oldState,
XAStatefulHolder.State newState)
Fired when the internal state of a
XAStatefulHolder has changed. |
void |
stateChanging(JdbcPooledConnection source,
XAStatefulHolder.State currentState,
XAStatefulHolder.State futureState)
Fired before the internal state of a
XAStatefulHolder has changed. |
String |
toString() |
void |
unregisterUncachedStatement(Statement stmt) |
acceptVisitorForXAResourceHolderStates, getXAResourceHolderStateCountForGtrid, getXAResourceHolderStateGtrids, getXAResourceHolderStatesForGtrid, hasStateForXAResource, isExistXAResourceHolderStatesForGtrid, isParticipatingInActiveGlobalTransaction, putXAResourceHolderState, removeXAResourceHolderStateaddStateChangeEventListener, getCreationDate, getState, removeStateChangeEventListener, setStateclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddStateChangeEventListener, getCreationDate, getState, removeStateChangeEventListener, setStatepublic JdbcPooledConnection(PoolingDataSource poolingDataSource, XAConnection xaConnection) throws SQLException
SQLExceptionpublic void close()
throws SQLException
XAStatefulHolderXAStatefulHolder represents.close in interface XAStatefulHolder<JdbcPooledConnection>SQLExceptionpublic RecoveryXAResourceHolder createRecoveryXAResourceHolder()
public boolean release()
throws SQLException
SQLExceptionpublic XAResource getXAResource()
XAResourceHolderXAResource implementation of the wrapped resource.getXAResource in interface XAResourceHolder<JdbcPooledConnection>public ResourceBean getResourceBean()
XAResourceHoldergetResourceBean in interface XAResourceHolder<JdbcPooledConnection>public PoolingDataSource getPoolingDataSource()
public List<JdbcPooledConnection> getXAResourceHolders()
XAStatefulHolderXAResourceHolders created by this
XAStatefulHolder that are still open.
This method is thread-safe.
getXAResourceHolders in interface XAStatefulHolder<JdbcPooledConnection>XAResourceHolders created by this
XAStatefulHolder that are still open.public int getJdbcVersion()
public Object getConnectionHandle() throws Exception
XAStatefulHolderXAStatefulHolder.
This method is thread-safe.
getConnectionHandle in interface XAStatefulHolder<JdbcPooledConnection>Exception - a resource-specific exception thrown when the disposable connection cannot be created.public void stateChanged(JdbcPooledConnection source, XAStatefulHolder.State oldState, XAStatefulHolder.State newState)
StateChangeListenerXAStatefulHolder has changed.stateChanged in interface StateChangeListener<JdbcPooledConnection>source - the XAStatefulHolder changing state.oldState - the old state of the XAStatefulHolder.newState - the new state of the XAStatefulHolder.public void stateChanging(JdbcPooledConnection source, XAStatefulHolder.State currentState, XAStatefulHolder.State futureState)
StateChangeListenerXAStatefulHolder has changed.stateChanging in interface StateChangeListener<JdbcPooledConnection>source - the XAStatefulHolder changing state.currentState - the current state of the XAStatefulHolder.futureState - the future state of the XAStatefulHolder.public PreparedStatement getCachedStatement(LruStatementCache.CacheKey key)
key - the key that has been used to cache the statement.public PreparedStatement putCachedStatement(LruStatementCache.CacheKey key, PreparedStatement statement)
key - the statement's cache key.statement - the statement to cache.public Statement registerUncachedStatement(Statement stmt)
stmt - the statement to register.public void unregisterUncachedStatement(Statement stmt)
public String getStateDescription()
getStateDescription in interface JdbcPooledConnectionMBeanpublic Date getAcquisitionDate()
getAcquisitionDate in interface JdbcPooledConnectionMBeanpublic Date getLastReleaseDate()
XAStatefulHoldergetLastReleaseDate in interface XAStatefulHolder<JdbcPooledConnection>public Collection<String> getTransactionGtridsCurrentlyHoldingThis()
getTransactionGtridsCurrentlyHoldingThis in interface JdbcPooledConnectionMBeanCopyright © 2006-2016 Bitronix Software. All Rights Reserved.