public interface ConnectionListener extends ConnectionListener
| Modifier and Type | Method and Description |
|---|---|
boolean |
controls(javax.resource.spi.ManagedConnection mc,
java.lang.Object connection)
Controls the managed connection / connection pair
|
void |
delist()
Delist the managed connection
|
void |
dissociate()
Dissociate the connection listener
|
void |
enlist()
Enlist the managed connection
|
long |
getLastUsedTime()
Retrieve the last time this connection was used.
|
long |
getLastValidatedTime()
Retrieve the last time this connection was validated.
|
ManagedConnectionPool |
getManagedConnectionPool()
Get the managed connection pool
|
int |
getNumberOfConnections()
Get number of connection handles
|
Pool |
getPool()
Retrieve the pool for this listener.
|
ConnectionState |
getState()
Retrieve the state of this connection.
|
boolean |
isEnlisted()
Is enlisted
|
boolean |
isManagedConnectionFree()
Is the managed connection free?
|
boolean |
isTimedOut(long timeout)
Has the connection timed out?
|
boolean |
isTrackByTx()
Get whether the listener is track by transaction
|
void |
registerConnection(java.lang.Object handle)
Register a new connection
|
void |
setLastValidatedTime(long lastValidated)
Set the last time, in milliseconds, that this connection was validated.
|
void |
setState(ConnectionState newState)
Set the state of this connection.
|
void |
setTrackByTx(boolean trackByTx)
Set whether the listener is track by transaction
|
boolean |
supportsLazyAssociation()
Supports lazy association
|
boolean |
supportsLazyEnlistment()
Supports lazy enlistment
|
void |
tidyup()
Tidyup
|
void |
unregisterConnection(java.lang.Object handle)
Unregister a connection
|
void |
unregisterConnections()
Unregister all connections
|
void |
used()
Mark the connection as used
|
getManagedConnectionint getNumberOfConnections()
Pool getPool()
void tidyup()
throws javax.resource.ResourceException
Invoked just before returning the connection to the pool when the connection is not being destroyed.
javax.resource.ResourceException - for any errorManagedConnectionPool getManagedConnectionPool()
ConnectionState getState()
void setState(ConnectionState newState)
newState - new stateboolean isTimedOut(long timeout)
timeout - the timeoutvoid used()
void registerConnection(java.lang.Object handle)
handle - the connection handlevoid unregisterConnection(java.lang.Object handle)
handle - the connection handlevoid unregisterConnections()
boolean isManagedConnectionFree()
boolean isEnlisted()
void enlist()
throws javax.transaction.SystemException
javax.transaction.SystemException - for errorsvoid delist()
throws javax.resource.ResourceException
javax.resource.ResourceException - if exception occursboolean isTrackByTx()
void setTrackByTx(boolean trackByTx)
trackByTx - true for track by transaction, false otherwiselong getLastValidatedTime()
void setLastValidatedTime(long lastValidated)
lastValidated - the last time the connection was validated in
milliseconds.long getLastUsedTime()
boolean controls(javax.resource.spi.ManagedConnection mc,
java.lang.Object connection)
mc - The managed connectionconnection - The connection; optionalvoid dissociate()
throws javax.resource.ResourceException
javax.resource.ResourceException - if exception occursboolean supportsLazyAssociation()
True if supported, otherwise falseboolean supportsLazyEnlistment()
True if supported, otherwise falseCopyright © 2013 IronJacamar (http://www.ironjacamar.org)