|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axonframework.eventhandling.annotation.AnnotationTransactionManager
public class AnnotationTransactionManager
A transaction manager that delegates calls to the appropriate annotated methods in a bean. These methods need to be
annotated with BeforeTransaction and AfterTransaction and may have one parameter: TransactionStatus.
| Constructor Summary | |
|---|---|
AnnotationTransactionManager(Object bean)
Initialize a transaction manager that delegates calls tot he given bean. |
|
| Method Summary | |
|---|---|
void |
afterTransaction(TransactionStatus transactionStatus)
Invoked by the EventProcessingScheduler after a series of events is processed. |
void |
beforeTransaction(TransactionStatus transactionStatus)
Invoked by the EventProcessingScheduler before processing a series of events. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AnnotationTransactionManager(Object bean)
bean.
bean - The bean containing annotation transaction management methods| Method Detail |
|---|
public void beforeTransaction(TransactionStatus transactionStatus)
TransactionStatus
may be used to set the maximum batch size for the current transaction.
beforeTransaction in interface TransactionManagertransactionStatus - The current status of the transactionTransactionManager.afterTransaction(TransactionStatus),
TransactionStatuspublic void afterTransaction(TransactionStatus transactionStatus)
TransactionStatus may be used to indicate whether the scheduler should yield to other event processing
schedulers or not.
This method is always called once for each invocation to TransactionManager.beforeTransaction(TransactionStatus), even if
no events were processed at all.
Note that this method is called when a transactional batch was handled successfully, as well as when an error
occurred. Use the TransactionStatus object to find information about transaction status and (when failed)
the cause of the failure.
afterTransaction in interface TransactionManagertransactionStatus - The current status of the transactionTransactionManager.beforeTransaction(TransactionStatus),
TransactionStatus
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||