|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axonframework.commandhandling.interceptors.TransactionInterceptor<org.springframework.transaction.TransactionStatus>
org.axonframework.commandhandling.interceptors.SpringTransactionalInterceptor
public class SpringTransactionalInterceptor
A CommandHandlerInterceptor that uses a PlatformTransactionManager to manage transactions around command
handling. If any events are handled synchronously (i.e. in the thread that processes the command), these handlers can
use the same transaction.
PlatformTransactionManager| Constructor Summary | |
|---|---|
SpringTransactionalInterceptor()
|
|
| Method Summary | |
|---|---|
protected void |
commitTransaction(org.springframework.transaction.TransactionStatus transaction)
Commits the transaction for the command execution described by the given context. |
protected void |
rollbackTransaction(org.springframework.transaction.TransactionStatus transaction)
Rolls back a transaction for a command execution described by the given context. |
void |
setTransactionDefinition(org.springframework.transaction.TransactionDefinition definition)
Sets the definition of the transaction to use. |
void |
setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
Sets the transactionManager to use to manage transactions. |
protected org.springframework.transaction.TransactionStatus |
startTransaction()
Start a new transaction for a command execution described by the given context. |
| Methods inherited from class org.axonframework.commandhandling.interceptors.TransactionInterceptor |
|---|
handle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SpringTransactionalInterceptor()
| Method Detail |
|---|
protected org.springframework.transaction.TransactionStatus startTransaction()
TransactionInterceptorcontext. The given
unitOfWork is the unitOfWork bound to the current thread.
startTransaction in class TransactionInterceptor<org.springframework.transaction.TransactionStatus>protected void commitTransaction(org.springframework.transaction.TransactionStatus transaction)
TransactionInterceptorcontext. The given
unitOfWork is the unitOfWork bound to the current thread.
commitTransaction in class TransactionInterceptor<org.springframework.transaction.TransactionStatus>transaction - The transaction object returned during during TransactionInterceptor.startTransaction()protected void rollbackTransaction(org.springframework.transaction.TransactionStatus transaction)
TransactionInterceptorcontext. The given
unitOfWork is the unitOfWork bound to the current thread.
rollbackTransaction in class TransactionInterceptor<org.springframework.transaction.TransactionStatus>transaction - The transaction object returned during during TransactionInterceptor.startTransaction()public void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
transactionManager to use to manage transactions.
transactionManager - the transactionManager to use to manage transactions.public void setTransactionDefinition(org.springframework.transaction.TransactionDefinition definition)
DefaultTransactionDefinition, which uses
propagation "REQUIRED" and the default isolation level of the underlying database.
definition - The transaction definition to use
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||