org.mule.module.db.internal.domain.connection
Class TransactionalDbConnectionFactory
java.lang.Object
org.mule.module.db.internal.domain.connection.TransactionalDbConnectionFactory
- All Implemented Interfaces:
- DbConnectionFactory
public class TransactionalDbConnectionFactory
- extends Object
- implements DbConnectionFactory
Creates connections using a DbTransactionManager to track active transactions.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected final org.apache.commons.logging.Log logger
dbConfig
protected final DbConfig dbConfig
dbTransactionManager
protected final DbTransactionManager dbTransactionManager
dbTypeManager
protected final DbTypeManager dbTypeManager
TransactionalDbConnectionFactory
public TransactionalDbConnectionFactory(DbConfig dbConfig,
DbTransactionManager dbTransactionManager,
DbTypeManager dbTypeManager)
createConnection
public DbConnection createConnection(TransactionalAction transactionalAction)
throws SQLException
- Description copied from interface:
DbConnectionFactory
- Creates a connection with a given
TransactionalAction
- Specified by:
createConnection in interface DbConnectionFactory
- Parameters:
transactionalAction - indicates whether or not the factory should
look at active transactions in order to lookup
for already created connections
- Returns:
- a connection for the given
TransactionalAction
- Throws:
SQLException - when not able to obtain a new connection
doCreateDbConnection
protected DbConnection doCreateDbConnection(Connection connection,
TransactionalAction transactionalAction)
releaseConnection
public void releaseConnection(DbConnection connection)
- Description copied from interface:
DbConnectionFactory
- Indicates that the connection is not used anymore
- Specified by:
releaseConnection in interface DbConnectionFactory
- Parameters:
connection - connection to release
Copyright © 2003–2014 MuleSoft, Inc.. All rights reserved.