Class JdbcTransactionFactory
- java.lang.Object
-
- org.apache.ibatis.transaction.jdbc.JdbcTransactionFactory
-
- All Implemented Interfaces:
TransactionFactory
public class JdbcTransactionFactory extends Object implements TransactionFactory
CreatesJdbcTransaction
instances.- Author:
- Clinton Begin
- See Also:
JdbcTransaction
-
-
Constructor Summary
Constructors Constructor Description JdbcTransactionFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Transaction
newTransaction(Connection conn)
Creates aTransaction
out of an existing connection.Transaction
newTransaction(DataSource ds, TransactionIsolationLevel level, boolean autoCommit)
Creates aTransaction
out of a datasource.void
setProperties(Properties props)
Sets transaction factory custom properties.
-
-
-
Method Detail
-
setProperties
public void setProperties(Properties props)
Description copied from interface:TransactionFactory
Sets transaction factory custom properties.- Specified by:
setProperties
in interfaceTransactionFactory
- Parameters:
props
- the new properties
-
newTransaction
public Transaction newTransaction(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(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
-
-