advancedSpring Internals — Bean Lifecycle & Proxies
Why can @TransactionalEventListener(AFTER_COMMIT) silently stop working in asynchronous event processing?
AFTER_COMMIT relies on the listener running within the SAME thread's transaction synchronization callbacks. If the listener is also marked @Async (running on a different thread) or the publishing transaction never actually commits (e.g., it's read-only or rolled back), the listener may never fire, with no obvious error.
This is a Pro question
Sign in, then upgrade to Pro or Power to unlock this question and the full Interview Prep bank.
Why can @TransactionalEventListener(AFTER_COMMIT) silently stop working in asynchronous event processing?