public class LocalXAConnectionFactory extends java.lang.Object implements XAConnectionFactory
| 限定符和类型 | 类和说明 |
|---|---|
protected static class |
LocalXAConnectionFactory.LocalXAResource
LocalXAResource is a fake XAResource for non-XA connections.
|
| 构造器和说明 |
|---|
LocalXAConnectionFactory(javax.transaction.TransactionManager transactionManager,
ConnectionFactory connectionFactory)
Creates an LocalXAConnectionFactory which uses the specified connection factory to create database connections.
|
| 限定符和类型 | 方法和说明 |
|---|---|
java.sql.Connection |
createConnection()
Create a new
Connection in an implementation specific fashion. |
ConnectionFactory |
getConnectionFactory() |
TransactionRegistry |
getTransactionRegistry()
Gets the TransactionRegistry for this connection factory which contains a the XAResource for every connection
created by this factory.
|
public LocalXAConnectionFactory(javax.transaction.TransactionManager transactionManager,
ConnectionFactory connectionFactory)
transactionManager - the transaction manager in which connections will be enlistedconnectionFactory - the connection factory from which connections will be retrievedpublic java.sql.Connection createConnection()
throws java.sql.SQLException
XAConnectionFactoryConnection 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 在接口中 ConnectionFactorycreateConnection 在接口中 XAConnectionFactoryConnectionjava.sql.SQLException - if a database error occurs creating the connectionpublic ConnectionFactory getConnectionFactory()
public TransactionRegistry getTransactionRegistry()
XAConnectionFactorygetTransactionRegistry 在接口中 XAConnectionFactory