|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ConnectionListener
A jboss connection listener
Field Summary | |
---|---|
static int |
DESTROY
Destroy this connection |
static int |
DESTROYED
This connection has been destroyed |
static int |
NORMAL
Normal state |
Method Summary | |
---|---|
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 |
void |
tidyup()
Tidyup |
void |
unregisterConnection(Object handle)
Unregister a connection |
void |
used()
Mark the connection as used |
Methods inherited from interface javax.resource.spi.ConnectionEventListener |
---|
connectionClosed, connectionErrorOccurred, localTransactionCommitted, localTransactionRolledback, localTransactionStarted |
Field Detail |
---|
static final int NORMAL
static final int DESTROY
static final int DESTROYED
Method Detail |
---|
javax.resource.spi.ManagedConnection getManagedConnection()
ManagedConnectionPool getManagedConnectionPool()
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 errorObject getContext()
int getState()
void setState(int newState)
boolean isTimedOut(long timeout)
timeout
- the timeout
void used()
void registerConnection(Object handle)
handle
- the connection handlevoid unregisterConnection(Object handle)
handle
- the connection handleboolean isManagedConnectionFree()
void enlist() throws SystemException
SystemException
void delist() throws javax.resource.ResourceException
javax.resource.ResourceException
boolean isTrackByTx()
void setTrackByTx(boolean trackByTx)
trackByTx
- true for track by transaction, false otherwiseboolean hasPermit()
void grantPermit(boolean value)
value
- true for owning the permit, false otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |