|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface UnitilsTransactionManager
Defines the contract for implementations that enable unit tests managed by unitils to be executed in a transaction.
| Method Summary | |
|---|---|
void |
activateTransactionIfNeeded(Object testObject)
|
void |
commit(Object testObject)
Commits the currently active transaction. |
DataSource |
getTransactionalDataSource(DataSource dataSource)
Wraps the given DataSource in a transactional proxy. |
void |
init(Set<UnitilsTransactionManagementConfiguration> transactionManagementConfigurations)
Initialize the transaction manager |
void |
rollback(Object testObject)
Rolls back the currently active transaction. |
void |
startTransaction(Object testObject)
Starts a transaction. |
| Method Detail |
|---|
void init(Set<UnitilsTransactionManagementConfiguration> transactionManagementConfigurations)
transactionManagementConfigurations - Set of possible providers of a spring PlatformTransactionManager, not nullDataSource getTransactionalDataSource(DataSource dataSource)
DataSource in a transactional proxy.
The DataSource returned will make sure that, for the duration of a transaction, the same java.sql.Connection
is returned, and that invocations on the close() method of these connections are suppressed.
dataSource - The data source to wrap, not null
void startTransaction(Object testObject)
testObject - The test instance, not nullvoid commit(Object testObject)
startTransaction(Object) with the same testObject within the same thread.
testObject - The test instance, not nullvoid rollback(Object testObject)
startTransaction(Object) with the same testObject within the same thread.
testObject - The test instance, not nullvoid activateTransactionIfNeeded(Object testObject)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||