public class TxConnectionListener extends AbstractConnectionListener
Modifier and Type | Class and Description |
---|---|
class |
TxConnectionListener.TransactionSynchronization
Transaction sync.
|
connectionHandles, trace
Constructor and Description |
---|
TxConnectionListener(ConnectionManager cm,
javax.resource.spi.ManagedConnection mc,
Pool pool,
ManagedConnectionPool mcp,
org.jboss.jca.common.api.metadata.common.FlushStrategy flushStrategy,
javax.transaction.xa.XAResource xaResource,
int xaResourceTimeout)
Creates a new tx listener.
|
Modifier and Type | Method and Description |
---|---|
void |
connectionClosed(javax.resource.spi.ConnectionEvent ce) |
void |
connectionErrorOccurred(javax.resource.spi.ConnectionEvent ce) |
void |
delist()
Delist the managed connection
|
void |
dissociate()
Dissociate the connection listener
|
void |
enlist()
Enlist the managed connection
|
protected CoreLogger |
getLogger()
Get the logger
|
protected javax.transaction.xa.XAResource |
getXAResource()
Get XA resource.
|
boolean |
isManagedConnectionFree()
Is the managed connection free?
|
void |
localTransactionCommitted(javax.resource.spi.ConnectionEvent ce) |
void |
localTransactionRolledback(javax.resource.spi.ConnectionEvent ce) |
void |
localTransactionStarted(javax.resource.spi.ConnectionEvent ce) |
void |
tidyup()
Tidyup
|
protected void |
toString(java.lang.StringBuffer buffer)
Add specific properties.
|
void |
used()
Mark the connection as used
|
compareTo, controls, getCachedConnectionManager, getConnectionManager, getLastUsedTime, getLastValidatedTime, getManagedConnection, getManagedConnectionPool, getNumberOfConnections, getPool, getState, isEnlisted, isTimedOut, isTrackByTx, registerConnection, setLastValidatedTime, setState, setTrackByTx, supportsLazyAssociation, supportsLazyEnlistment, toString, unregisterConnection, unregisterConnections
public TxConnectionListener(ConnectionManager cm, javax.resource.spi.ManagedConnection mc, Pool pool, ManagedConnectionPool mcp, org.jboss.jca.common.api.metadata.common.FlushStrategy flushStrategy, javax.transaction.xa.XAResource xaResource, int xaResourceTimeout) throws javax.resource.ResourceException
cm
- connection managermc
- managed connectionpool
- poolmcp
- mcpflushStrategy
- flushStrategyxaResource
- xaresource instancexaResourceTimeout
- timeout for the XAResourcejavax.resource.ResourceException
- if aexception while creatingprotected CoreLogger getLogger()
getLogger
in class AbstractConnectionListener
public void used()
used
in class AbstractConnectionListener
public void enlist() throws javax.transaction.SystemException
enlist
in class AbstractConnectionListener
javax.transaction.SystemException
- for errorspublic void delist() throws javax.resource.ResourceException
delist
in class AbstractConnectionListener
javax.resource.ResourceException
- if exception occurspublic void dissociate() throws javax.resource.ResourceException
dissociate
in class AbstractConnectionListener
javax.resource.ResourceException
- if exception occursprotected javax.transaction.xa.XAResource getXAResource()
public void connectionClosed(javax.resource.spi.ConnectionEvent ce)
connectionClosed
in interface javax.resource.spi.ConnectionEventListener
connectionClosed
in class AbstractConnectionListener
public void localTransactionStarted(javax.resource.spi.ConnectionEvent ce)
localTransactionStarted
in interface javax.resource.spi.ConnectionEventListener
localTransactionStarted
in class AbstractConnectionListener
public void localTransactionCommitted(javax.resource.spi.ConnectionEvent ce)
localTransactionCommitted
in interface javax.resource.spi.ConnectionEventListener
localTransactionCommitted
in class AbstractConnectionListener
public void localTransactionRolledback(javax.resource.spi.ConnectionEvent ce)
localTransactionRolledback
in interface javax.resource.spi.ConnectionEventListener
localTransactionRolledback
in class AbstractConnectionListener
public void tidyup() throws javax.resource.ResourceException
Invoked just before returning the connection to the pool when the connection is not being destroyed.
tidyup
in class AbstractConnectionListener
javax.resource.ResourceException
- for any errorpublic void connectionErrorOccurred(javax.resource.spi.ConnectionEvent ce)
connectionErrorOccurred
in interface javax.resource.spi.ConnectionEventListener
connectionErrorOccurred
in class AbstractConnectionListener
public boolean isManagedConnectionFree()
isManagedConnectionFree
in class AbstractConnectionListener
protected void toString(java.lang.StringBuffer buffer)
toString
in class AbstractConnectionListener
buffer
- buffer instanceCopyright © 2013 IronJacamar (http://www.ironjacamar.org)