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
19 lines
628 B
Plaintext
19 lines
628 B
Plaintext
# Listener order, an event returned from a listener, and a listener that throws
|
|
|
|
|
|
--- all listeners succeed ---
|
|
earliest (@Order(-10), a different bean)
|
|
receipt (@Order(0)) returns a ReceiptIssued
|
|
onReceipt received ReceiptIssued[orderId=A-1]
|
|
first (@Order(1))
|
|
second (@Order(2))
|
|
unordered (no @Order)
|
|
|
|
--- the @Order(2) listener throws ---
|
|
earliest (@Order(-10), a different bean)
|
|
receipt (@Order(0)) returns a ReceiptIssued
|
|
onReceipt received ReceiptIssued[orderId=A-2]
|
|
first (@Order(1))
|
|
second (@Order(2))
|
|
publishEvent threw: IllegalStateException: second listener failed
|