public class LocalXAConnectionFactory extends Object implements XAConnectionFactory
Modifier and Type | Class and Description |
---|---|
protected static class |
LocalXAConnectionFactory.LocalXAResource
LocalXAResource is a fake XAResource for non-XA connections.
|
Constructor and Description |
---|
LocalXAConnectionFactory(TransactionManager transactionManager,
ConnectionFactory connectionFactory)
Creates an LocalXAConnectionFactory which uses the specified connection factory to create database
connections.
|
Modifier and Type | Method and Description |
---|---|
Connection |
createConnection()
Create a new
Connection in an implementation specific fashion. |
TransactionRegistry |
getTransactionRegistry()
Gets the TransactionRegistry for this connection factory which contains a the
XAResource for every connection created by this factory.
|
public LocalXAConnectionFactory(TransactionManager transactionManager, ConnectionFactory connectionFactory)
transactionManager
- the transaction manager in which connections will be enlistedconnectionFactory
- the connection factory from which connections will be retrievedpublic TransactionRegistry getTransactionRegistry()
XAConnectionFactory
getTransactionRegistry
in interface XAConnectionFactory
public Connection createConnection() throws SQLException
XAConnectionFactory
Connection
in an implementation specific fashion.
An implementation can assume that the caller of this will wrap the connection in a proxy that protects access to the setAutoCommit, commit and rollback when enrolled in a XA transaction.
createConnection
in interface ConnectionFactory
createConnection
in interface XAConnectionFactory
Connection
SQLException
- if a database error occurs creating the connectionCopyright © 2001–2015 The Apache Software Foundation. All rights reserved.