Annotation Type TransactionalEventListener


  • @Target({METHOD,ANNOTATION_TYPE})
    @Retention(RUNTIME)
    @Documented
    @Adapter(io.micronaut.context.event.ApplicationEventListener.class)
    @Indexed(io.micronaut.context.event.ApplicationEventListener.class)
    public @interface TransactionalEventListener
    Largely based on the similar annotation in Spring. This is an Adapter that turns any annotated method into a transaction aware event listener that implements the ApplicationEventListener interface.
    Since:
    1.0.0
    Author:
    graemerocher
    See Also:
    ApplicationEventListener, TransactionalEventAdvice, TransactionalEventInterceptor
    • Element Detail

      • value

        TransactionalEventListener.TransactionPhase value
        Returns:
        The transaction phase this listener applies to.
        Default:
        io.micronaut.transaction.annotation.TransactionalEventListener.TransactionPhase.AFTER_COMMIT
      • transactionManager

        java.lang.String transactionManager
        A qualifier value for the specified transaction.

        May be used to determine the target transaction manager, matching the qualifier value (or the bean name) of a specific SynchronousTransactionManager bean definition.

        Returns:
        The transaction manager
        Since:
        3.5.0
        Default:
        ""