Package com.atlassian.crowd.core.event
Class TransactionAwareEventDispatcher
java.lang.Object
com.atlassian.event.internal.AsynchronousAbleEventDispatcher
com.atlassian.crowd.core.event.TransactionAwareEventDispatcher
- All Implemented Interfaces:
com.atlassian.event.spi.EventDispatcher
public class TransactionAwareEventDispatcher
extends com.atlassian.event.internal.AsynchronousAbleEventDispatcher
Wraps dispatching each atlassian-events event in a separate hibernate transaction.
These are marked as PROPAGATION_REQUIRES_NEW, to get a new synchronisation context, and to work correclty
with being invoked when invoked in an afterCommit() call by
TransactionAwareEventPublisher.
The physical transaction for the calling thread should actually never be active when
{dispatch(ListenerInvoker, Object)} is called.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringListeners with this scope will not be automatically run in transaction and will be responsible of transaction management on it's own. -
Constructor Summary
ConstructorsConstructorDescriptionTransactionAwareEventDispatcher(com.atlassian.event.spi.EventExecutorFactory executorFactory, org.springframework.transaction.PlatformTransactionManager transactionManager) -
Method Summary
Methods inherited from class com.atlassian.event.internal.AsynchronousAbleEventDispatcher
executorFor, getAsynchronousExecutor, getSynchronousExecutor
-
Field Details
-
DISABLE_TRANSACTION
Listeners with this scope will not be automatically run in transaction and will be responsible of transaction management on it's own.- See Also:
-
-
Constructor Details
-
TransactionAwareEventDispatcher
public TransactionAwareEventDispatcher(com.atlassian.event.spi.EventExecutorFactory executorFactory, org.springframework.transaction.PlatformTransactionManager transactionManager)
-
-
Method Details
-
dispatch
- Specified by:
dispatchin interfacecom.atlassian.event.spi.EventDispatcher- Overrides:
dispatchin classcom.atlassian.event.internal.AsynchronousAbleEventDispatcher
-