org.apache.commons.dbcp.managed
public class TransactionRegistry extends java.lang.Object
| Constructor and Description |
|---|
TransactionRegistry(TransactionManager transactionManager)
Creates a TransactionRegistry for the specified transaction manager.
|
| Modifier and Type | Method and Description |
|---|---|
TransactionContext |
getActiveTransactionContext()
Gets the active TransactionContext or null if not Transaction is active.
|
javax.transaction.xa.XAResource |
getXAResource(java.sql.Connection connection)
Gets the XAResource registered for the connection.
|
void |
registerConnection(java.sql.Connection connection,
javax.transaction.xa.XAResource xaResource)
Registers the association between a Connection and a XAResource.
|
void |
unregisterConnection(java.sql.Connection connection)
Unregisters a destroyed connection from
TransactionRegistry |
public TransactionRegistry(TransactionManager transactionManager)
transactionManager - the transaction manager used to enlist connectionspublic TransactionContext getActiveTransactionContext() throws java.sql.SQLException
java.sql.SQLException - if an error occurs while fetching the transactionpublic javax.transaction.xa.XAResource getXAResource(java.sql.Connection connection)
throws java.sql.SQLException
connection - the connectionjava.sql.SQLException - if the connection does not have a registered XAResourcepublic void registerConnection(java.sql.Connection connection,
javax.transaction.xa.XAResource xaResource)
connection - the JDBC connectionxaResource - the XAResource which managed the connection within a transactionpublic void unregisterConnection(java.sql.Connection connection)
TransactionRegistryconnection - Copyright © 2001-2004 Apache Software Foundation. Documenation generated September 23 2013.