|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbitronix.tm.resource.common.AbstractXAStatefulHolder
bitronix.tm.resource.common.AbstractXAResourceHolder
bitronix.tm.resource.jdbc.JdbcPooledConnection
public class JdbcPooledConnection
Implementation of a JDBC pooled connection wrapping vendor's XAConnection implementation.
| Field Summary |
|---|
| Fields inherited from interface bitronix.tm.resource.common.XAStatefulHolder |
|---|
STATE_ACCESSIBLE, STATE_CLOSED, STATE_IN_POOL, STATE_NOT_ACCESSIBLE |
| Constructor Summary | |
|---|---|
JdbcPooledConnection(PoolingDataSource poolingDataSource,
XAConnection xaConnection)
|
|
| Method Summary | |
|---|---|
void |
close()
Close the physical connection that this XAStatefulHolder represents. |
RecoveryXAResourceHolder |
createRecoveryXAResourceHolder()
|
Date |
getAcquisitionDate()
|
protected JdbcPreparedStatementHandle |
getCachedStatement(JdbcPreparedStatementHandle stmt)
Get a PreparedStatement from cache. |
Object |
getConnectionHandle()
Create a disposable handler used to drive a pooled instance of XAStatefulHolder. |
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 |
getTransactionGtridsCurrentlyHoldingThis()
|
XAResource |
getXAResource()
Get the vendor's XAResource implementation of the wrapped resource. |
List<XAResourceHolder> |
getXAResourceHolders()
Get the list of XAResourceHolders created by this
XAStatefulHolder that are still open. |
protected JdbcPreparedStatementHandle |
putCachedStatement(JdbcPreparedStatementHandle stmt)
Put a PreparedStatement in the cache. |
protected Statement |
registerUncachedStatement(Statement stmt)
Register uncached statement so that it can be closed when the connection is put back in the pool. |
protected void |
release()
|
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. |
String |
toString()
|
protected void |
unregisterUncachedStatement(Statement stmt)
|
| Methods inherited from class bitronix.tm.resource.common.AbstractXAResourceHolder |
|---|
getXAResourceHolderStateGtrids, getXAResourceHolderStatesForGtrid, hasStateForXAResource, isParticipatingInActiveGlobalTransaction, putXAResourceHolderState, removeXAResourceHolderState |
| Methods inherited from class bitronix.tm.resource.common.AbstractXAStatefulHolder |
|---|
addStateChangeEventListener, getState, removeStateChangeEventListener, setState |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface bitronix.tm.resource.common.XAStatefulHolder |
|---|
addStateChangeEventListener, getState, removeStateChangeEventListener, setState |
| Constructor Detail |
|---|
public JdbcPooledConnection(PoolingDataSource poolingDataSource,
XAConnection xaConnection)
throws SQLException
SQLException| Method Detail |
|---|
public void close()
throws SQLException
XAStatefulHolderXAStatefulHolder represents.
close in interface XAStatefulHolderSQLExceptionpublic RecoveryXAResourceHolder createRecoveryXAResourceHolder()
protected void release()
throws SQLException
SQLExceptionpublic XAResource getXAResource()
XAResourceHolderXAResource implementation of the wrapped resource.
getXAResource in interface XAResourceHolderpublic ResourceBean getResourceBean()
XAResourceHolder
getResourceBean in interface XAResourceHolderpublic PoolingDataSource getPoolingDataSource()
public List<XAResourceHolder> getXAResourceHolders()
XAStatefulHolderXAResourceHolders created by this
XAStatefulHolder that are still open.
This method is thread-safe.
getXAResourceHolders in interface XAStatefulHolderXAResourceHolders created by this
XAStatefulHolder that are still open.
public Object getConnectionHandle()
throws Exception
XAStatefulHolderXAStatefulHolder.
This method is thread-safe.
getConnectionHandle in interface XAStatefulHolderException - a resource-specific exception thrown when the disaposable connection cannot be created.
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.protected JdbcPreparedStatementHandle getCachedStatement(JdbcPreparedStatementHandle stmt)
stmt - the key that has been used to cache the statement.
protected JdbcPreparedStatementHandle putCachedStatement(JdbcPreparedStatementHandle stmt)
stmt - the statement to cache.
protected Statement registerUncachedStatement(Statement stmt)
stmt - the statement to register.
protected void unregisterUncachedStatement(Statement stmt)
public String toString()
toString in class Objectpublic String getStateDescription()
getStateDescription in interface JdbcPooledConnectionMBeanpublic Date getAcquisitionDate()
getAcquisitionDate in interface JdbcPooledConnectionMBeanpublic Date getLastReleaseDate()
XAStatefulHolder
getLastReleaseDate in interface XAStatefulHolderpublic Collection getTransactionGtridsCurrentlyHoldingThis()
getTransactionGtridsCurrentlyHoldingThis in interface JdbcPooledConnectionMBean
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||