public class TxConnectionListener extends AbstractConnectionListener
Modifier and Type | Class and Description |
---|---|
class |
TxConnectionListener.TransactionSynchronization
Transaction sync.
|
trace
Constructor and Description |
---|
TxConnectionListener(ConnectionManager cm,
javax.resource.spi.ManagedConnection mc,
Pool pool,
java.lang.Object context,
org.jboss.jca.common.api.metadata.common.FlushStrategy flushStrategy,
javax.transaction.xa.XAResource xaResource)
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 |
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.
|
compareTo, getCachedConnectionManager, getConnectionManager, getContext, getLastValidatedTime, getManagedConnection, getPool, getState, isTimedOut, isTrackByTx, registerConnection, setLastValidatedTime, setState, setTrackByTx, toString, unregisterConnection, unregisterConnections, used
public TxConnectionListener(ConnectionManager cm, javax.resource.spi.ManagedConnection mc, Pool pool, java.lang.Object context, org.jboss.jca.common.api.metadata.common.FlushStrategy flushStrategy, javax.transaction.xa.XAResource xaResource) throws javax.resource.ResourceException
cm
- connection managermc
- managed connectionpool
- poolcontext
- contextflushStrategy
- flushStrategyxaResource
- xaresource instancejavax.resource.ResourceException
- if aexception while creatingprotected CoreLogger getLogger()
getLogger
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 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 ? 2008-2009 Red Hat Middleware LLC (http://www.jboss.com/)