|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jboss.resource.connectionmanager.BaseConnectionManager2.BaseConnectionEventListener
| Field Summary | |
protected org.jboss.logging.Logger |
log
|
protected boolean |
trace
|
| Fields inherited from interface org.jboss.resource.connectionmanager.ConnectionListener |
DESTROY, DESTROYED, NORMAL |
| Constructor Summary | |
protected |
BaseConnectionManager2.BaseConnectionEventListener(javax.resource.spi.ManagedConnection mc,
ManagedConnectionPool mcp,
Object context,
org.jboss.logging.Logger log)
|
| Method Summary | |
void |
connectionErrorOccurred(javax.resource.spi.ConnectionEvent ce)
May be overridden to e.g. |
void |
delist()
Delist the managed connection |
void |
enlist()
Enlist the managed connection |
Object |
getContext()
Retrieve the context used by the pool |
javax.resource.spi.ManagedConnection |
getManagedConnection()
Retrieve the managed connection for this listener |
ManagedConnectionPool |
getManagedConnectionPool()
Retrieve the managed connection pool for this listener |
int |
getState()
Retrieve the state of this connection |
void |
grantPermit(boolean value)
Tell the connection listener whether it owns the permit. |
boolean |
hasPermit()
Whether the connection has a permit |
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(Object handle)
Register a new connection |
void |
setState(int newState)
Set the state of this connection |
void |
setTrackByTx(boolean trackByTx)
Set whether the listener is track by transaction |
String |
toString()
|
void |
unregisterConnection(Object handle)
Unregister a connection |
protected void |
unregisterConnections()
|
void |
used()
Mark the connection as used |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.resource.spi.ConnectionEventListener |
connectionClosed, localTransactionCommitted, localTransactionRolledback, localTransactionStarted |
| Field Detail |
protected org.jboss.logging.Logger log
protected boolean trace
| Constructor Detail |
protected BaseConnectionManager2.BaseConnectionEventListener(javax.resource.spi.ManagedConnection mc,
ManagedConnectionPool mcp,
Object context,
org.jboss.logging.Logger log)
| Method Detail |
public javax.resource.spi.ManagedConnection getManagedConnection()
ConnectionListener
getManagedConnection in interface ConnectionListenerpublic ManagedConnectionPool getManagedConnectionPool()
ConnectionListener
getManagedConnectionPool in interface ConnectionListenerpublic Object getContext()
ConnectionListener
getContext in interface ConnectionListenerpublic int getState()
ConnectionListener
getState in interface ConnectionListenerpublic void setState(int newState)
ConnectionListener
setState in interface ConnectionListenerpublic boolean isTimedOut(long timeout)
ConnectionListener
isTimedOut in interface ConnectionListenertimeout - the timeout
public void used()
ConnectionListener
used in interface ConnectionListenerpublic boolean isTrackByTx()
ConnectionListener
isTrackByTx in interface ConnectionListenerpublic void setTrackByTx(boolean trackByTx)
ConnectionListener
setTrackByTx in interface ConnectionListenertrackByTx - true for track by transaction, false otherwisepublic void registerConnection(Object handle)
ConnectionListener
registerConnection in interface ConnectionListenerhandle - the connection handlepublic void unregisterConnection(Object handle)
ConnectionListener
unregisterConnection in interface ConnectionListenerhandle - the connection handlepublic boolean isManagedConnectionFree()
ConnectionListener
isManagedConnectionFree in interface ConnectionListenerprotected void unregisterConnections()
public void connectionErrorOccurred(javax.resource.spi.ConnectionEvent ce)
connectionErrorOccurred in interface javax.resource.spi.ConnectionEventListenerce -
public void enlist()
throws SystemException
ConnectionListener
enlist in interface ConnectionListenerSystemException
public void delist()
throws javax.resource.ResourceException
ConnectionListener
delist in interface ConnectionListenerjavax.resource.ResourceExceptionpublic boolean hasPermit()
ConnectionListener
hasPermit in interface ConnectionListenerpublic void grantPermit(boolean value)
ConnectionListener
grantPermit in interface ConnectionListenervalue - true for owning the permit, false otherwisepublic String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||