Class JdbcTransactionFactory
- java.lang.Object
-
- org.apache.ibatis.transaction.jdbc.JdbcTransactionFactory
-
- All Implemented Interfaces:
TransactionFactory
public class JdbcTransactionFactory extends java.lang.Object implements TransactionFactory
CreatesJdbcTransaction
instances.- Author:
- Clinton Begin
- See Also:
JdbcTransaction
-
-
Constructor Summary
Constructors Constructor Description JdbcTransactionFactory()
-
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.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.ibatis.transaction.TransactionFactory
setProperties
-
-
-
-
Method Detail
-
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
-
-