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
·374 views
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
·124 views
Spring and Java mechanics
Spring events that survive a crash
A fire-and-forget @Async listener turns every SMTP hiccup into a lost message. Here is how @TransactionalEventListener plus an event publication table makes it durable — and the four ways that setup silently does nothing.
2 Aug 2026
·
7 min read
·185 views