Package org.apache.ibatis.transaction
Interface TransactionFactory
- All Known Implementing Classes:
JdbcTransactionFactory
,ManagedTransactionFactory
public interface TransactionFactory
Creates
Transaction
instances.- Author:
- Clinton Begin
-
Method Summary
Modifier and TypeMethodDescriptionnewTransaction
(Connection conn) Creates aTransaction
out of an existing connection.newTransaction
(DataSource dataSource, TransactionIsolationLevel level, boolean autoCommit) Creates aTransaction
out of a datasource.default void
setProperties
(Properties props) Sets transaction factory custom properties.
-
Method Details
-
setProperties
Sets transaction factory custom properties.- Parameters:
props
- the new properties
-
newTransaction
Creates aTransaction
out of an existing connection.- Parameters:
conn
- Existing database connection- Returns:
- Transaction
- Since:
- 3.1.0
-
newTransaction
Transaction newTransaction(DataSource dataSource, TransactionIsolationLevel level, boolean autoCommit) Creates aTransaction
out of a datasource.- Parameters:
dataSource
- DataSource to take the connection fromlevel
- Desired isolation levelautoCommit
- Desired autocommit- Returns:
- Transaction
- Since:
- 3.1.0
-