Class ManagedTransactionFactory
- java.lang.Object
-
- org.apache.ibatis.transaction.managed.ManagedTransactionFactory
-
- All Implemented Interfaces:
TransactionFactory
public class ManagedTransactionFactory extends java.lang.Object implements TransactionFactory
CreatesManagedTransaction
instances.- Author:
- Clinton Begin
- See Also:
ManagedTransaction
-
-
Constructor Summary
Constructors Constructor Description ManagedTransactionFactory()
-
Method Summary
Modifier and Type Method Description Transaction
newTransaction(java.sql.Connection conn)
Creates aTransaction
out of an existing connection.Transaction
newTransaction(javax.sql.DataSource ds, TransactionIsolationLevel level, boolean autoCommit)
Creates aTransaction
out of a datasource.void
setProperties(java.util.Properties props)
Sets transaction factory custom properties.
-
-
-
Method Detail
-
setProperties
public void setProperties(java.util.Properties props)
Description copied from interface:TransactionFactory
Sets transaction factory custom properties.- Specified by:
setProperties
in interfaceTransactionFactory
-
newTransaction
public Transaction newTransaction(java.sql.Connection conn)
Description copied from interface:TransactionFactory
Creates aTransaction
out of an existing connection.- Specified by:
newTransaction
in interfaceTransactionFactory
- Parameters:
conn
- Existing database connection- Returns:
- Transaction
-
newTransaction
public Transaction newTransaction(javax.sql.DataSource ds, TransactionIsolationLevel level, boolean autoCommit)
Description copied from interface:TransactionFactory
Creates aTransaction
out of a datasource.- Specified by:
newTransaction
in interfaceTransactionFactory
- Parameters:
ds
- DataSource to take the connection fromlevel
- Desired isolation levelautoCommit
- Desired autocommit- Returns:
- Transaction
-
-