org.apache.ibatis.transaction
Interface TransactionFactory

All Known Implementing Classes:
JdbcTransactionFactory, ManagedTransactionFactory

public interface TransactionFactory

Creates Transaction instances.


Method Summary
 Transaction newTransaction(Connection conn)
          Creates a Transaction out of an existing connection.
 Transaction newTransaction(DataSource dataSource, TransactionIsolationLevel level, boolean autoCommit)
          Creates a Transaction out of a datasource.
 void setProperties(Properties props)
          Sets transaction factory custom properties.
 

Method Detail

setProperties

void setProperties(Properties props)
Sets transaction factory custom properties.

Parameters:
props -

newTransaction

Transaction newTransaction(Connection conn)
Creates a Transaction 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 a Transaction out of a datasource.

Parameters:
dataSource - DataSource to take the connection from
level - Desired isolation level
autoCommit - Desired autocommit
Returns:
Transaction
Since:
3.1.0


Copyright © 2010-2012 MyBatis.org. All Rights Reserved.