|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 ConnectionListener
public ManagedConnectionPool getManagedConnectionPool()
ConnectionListener
getManagedConnectionPool
in interface ConnectionListener
public Object getContext()
ConnectionListener
getContext
in interface ConnectionListener
public int getState()
ConnectionListener
getState
in interface ConnectionListener
public void setState(int newState)
ConnectionListener
setState
in interface ConnectionListener
public boolean isTimedOut(long timeout)
ConnectionListener
isTimedOut
in interface ConnectionListener
timeout
- the timeout
public void used()
ConnectionListener
used
in interface ConnectionListener
public boolean isTrackByTx()
ConnectionListener
isTrackByTx
in interface ConnectionListener
public void setTrackByTx(boolean trackByTx)
ConnectionListener
setTrackByTx
in interface ConnectionListener
trackByTx
- true for track by transaction, false otherwisepublic void registerConnection(Object handle)
ConnectionListener
registerConnection
in interface ConnectionListener
handle
- the connection handlepublic void unregisterConnection(Object handle)
ConnectionListener
unregisterConnection
in interface ConnectionListener
handle
- the connection handlepublic boolean isManagedConnectionFree()
ConnectionListener
isManagedConnectionFree
in interface ConnectionListener
protected void unregisterConnections()
public void connectionErrorOccurred(javax.resource.spi.ConnectionEvent ce)
connectionErrorOccurred
in interface javax.resource.spi.ConnectionEventListener
ce
- public void enlist() throws SystemException
ConnectionListener
enlist
in interface ConnectionListener
SystemException
public void delist() throws javax.resource.ResourceException
ConnectionListener
delist
in interface ConnectionListener
javax.resource.ResourceException
public boolean hasPermit()
ConnectionListener
hasPermit
in interface ConnectionListener
public void grantPermit(boolean value)
ConnectionListener
grantPermit
in interface ConnectionListener
value
- 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 |