Thirteen captured transcripts: a listener is a blocking method call, ordering and chaining, SpEL conditions, generic-event erasure, every transaction phase on commit and rollback, what an AFTER_COMMIT listener can write, which exceptions reach the publisher, async listeners on platform and virtual threads, and the annotations behind Spring Modulith's @ApplicationModuleListener. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Uu7q8vPeREyT4218EJPzz1
22 lines
1.1 KiB
Plaintext
22 lines
1.1 KiB
Plaintext
# The same listeners, one publisher call that commits and one that rolls back
|
|
|
|
|
|
--- place("ok-1", fail = false) ---
|
|
OrderService.place: row inserted, publishing
|
|
@EventListener tx active: true row visible to other connections: false
|
|
OrderService.place: leaving the method, commit follows
|
|
BEFORE_COMMIT tx active: true row visible to other connections: false
|
|
AFTER_COMMIT tx active: true row visible to other connections: true
|
|
AFTER_COMPLETION tx active: true row visible to other connections: true
|
|
|
|
--- place("bad-1", fail = true) ---
|
|
OrderService.place: row inserted, publishing
|
|
@EventListener tx active: true row visible to other connections: false
|
|
AFTER_ROLLBACK tx active: true row visible to other connections: false
|
|
AFTER_COMPLETION tx active: true row visible to other connections: false
|
|
caller saw: IllegalStateException: payment declined
|
|
|
|
--- rows afterwards ---
|
|
ok-1 rows : 1
|
|
bad-1 rows: 0
|