public class TransactionRegistry extends 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.
|
XAResource |
getXAResource(Connection connection)
Gets the XAResource registered for the connection.
|
void |
registerConnection(Connection connection,
XAResource xaResource)
Registers the association between a Connection and a XAResource.
|
void |
unregisterConnection(Connection connection) |
public TransactionRegistry(TransactionManager transactionManager)
transactionManager - the transaction manager used to enlist connectionspublic void registerConnection(Connection connection, XAResource xaResource)
connection - the JDBC connectionxaResource - the XAResource which managed the connection within a transactionpublic XAResource getXAResource(Connection connection) throws SQLException
connection - the connectionSQLException - if the connection does not have a registered XAResourcepublic TransactionContext getActiveTransactionContext() throws SQLException
SQLException - if an error occurs while fetching the transactionpublic void unregisterConnection(Connection connection)
Copyright © 2015. All rights reserved.