public interface UnitilsTransactionManager
| 限定符和类型 | 方法和说明 |
|---|---|
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.
|
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 nullvoid 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)
Copyright © 2008–2020 Matrix. All rights reserved.