class DatabaseMigrationTransactionManager extends java.lang.Object
Created by Jim on 7/15/2016.
Type | Name and description |
---|---|
ApplicationContext |
applicationContext |
java.lang.String |
dataSource |
Constructor and description |
---|
DatabaseMigrationTransactionManager(ApplicationContext applicationContext, java.lang.String dataSource) |
Type Params | Return Type | Name and description |
---|---|---|
|
PlatformTransactionManager |
getTransactionManager()
|
|
void |
withNewTransaction(groovy.lang.Closure callable) Executes the closure within the context of a new transaction |
|
void |
withNewTransaction(java.util.Map transactionProperties, groovy.lang.Closure callable) Executes the closure within the context of a new transaction which is configured with the properties contained in transactionProperties. |
|
void |
withTransaction(groovy.lang.Closure callable) Executes the closure within the context of a transaction, creating one if none is present or joining an existing transaction if one is already present. |
|
void |
withTransaction(java.util.Map transactionProperties, groovy.lang.Closure callable) |
|
void |
withTransaction(TransactionDefinition definition, groovy.lang.Closure callable) Executes the closure within the context of a transaction for the given TransactionDefinition |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Executes the closure within the context of a new transaction
callable
- The closure to callExecutes the closure within the context of a new transaction which is configured with the properties contained in transactionProperties. transactionProperties may contain any properties supported by DefaultTransactionDefinition. Note that if transactionProperties includes entries for propagationBehavior or propagationName, those values will be ignored. This method always sets the propagation level to TransactionDefinition.REQUIRES_NEW.
SomeEntity.withNewTransaction([isolationLevel: TransactionDefinition.ISOLATION_REPEATABLE_READ]) { // ... }
transactionProperties
- properties to configure the transaction propertiescallable
- The closure to callExecutes the closure within the context of a transaction, creating one if none is present or joining an existing transaction if one is already present.
callable
- The closure to callExecutes the closure within the context of a transaction for the given TransactionDefinition
callable
- The closure to callGroovy Documentation