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