Spring and Java mechanics
Four phases, and the one that never runs at all
What @TransactionalEventListener actually fires on commit, on rollback, and on neither -- plus a write inside AFTER_COMMIT that survives or vanishes depending on your connection pool. Measured in a playground, not quoted from the Javadoc.
4 Aug 2026
·
7 min read
Spring and Java mechanics
publishEvent() is a method call, not a queue
Spring's plain @EventListener runs on your thread, inside your transaction, before your next line — and a chained event is fully handled before the original finishes. Everything here was verified by running it, not by reading the reference page.
3 Aug 2026
·
7 min read