Class TransactionalApplicationListenerMethodAdapter

java.lang.Object
org.springframework.context.event.ApplicationListenerMethodAdapter
org.springframework.transaction.event.TransactionalApplicationListenerMethodAdapter
All Implemented Interfaces:
EventListener, org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>, org.springframework.context.event.GenericApplicationListener, org.springframework.context.event.SmartApplicationListener, org.springframework.core.Ordered, TransactionalApplicationListener<org.springframework.context.ApplicationEvent>

public class TransactionalApplicationListenerMethodAdapter extends org.springframework.context.event.ApplicationListenerMethodAdapter implements TransactionalApplicationListener<org.springframework.context.ApplicationEvent>
GenericApplicationListener adapter that delegates the processing of an event to a TransactionalEventListener annotated method. Supports the exact same features as any regular EventListener annotated method but is aware of the transactional context of the event publisher.

Processing of TransactionalEventListener is enabled automatically when Spring's transaction management is enabled. For other cases, registering a bean of type TransactionalEventListenerFactory is required.

Since:
5.3
Author:
Stephane Nicoll, Juergen Hoeller
See Also:
  • Constructor Details

    • TransactionalApplicationListenerMethodAdapter

      public TransactionalApplicationListenerMethodAdapter(String beanName, Class<?> targetClass, Method method)
      Construct a new TransactionalApplicationListenerMethodAdapter.
      Parameters:
      beanName - the name of the bean to invoke the listener method on
      targetClass - the target class that the method is declared on
      method - the listener method to invoke
  • Method Details