public interface ConnectionListener extends ConnectionListener
Modifier and Type | Method and Description |
---|---|
void |
delist()
Delist the managed connection
|
void |
enlist()
Enlist the managed connection
|
java.lang.Object |
getContext()
Retrieve the context used by the pool.
|
long |
getLastValidatedTime()
Retrieve the last time this connection was validated.
|
Pool |
getPool()
Retrieve the pool for this listener.
|
ConnectionState |
getState()
Retrieve the state of this connection.
|
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
|
void |
tidyup()
Tidyup
|
void |
unregisterConnection(java.lang.Object handle)
Unregister a connection
|
void |
used()
Mark the connection as used
|
getManagedConnection
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 errorjava.lang.Object getContext()
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 handleboolean isManagedConnectionFree()
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.Copyright ? 2008-2009 Red Hat Middleware LLC (http://www.jboss.com/)