-
Notifications
You must be signed in to change notification settings - Fork 38.9k
Description
Following up on #35382 and #36072, we can support a MethodRollbackEvent in TransactionInterceptor, analogous to MethodRetryEvent and reusing the generalized MethodFailureEvent as a superclass.
For every exception triggering a rollback, TransactionInterceptor publishes a MethodRollbackEvent, even for reactive transactions. This complements existing facilities such as TransactionExecutionListener which have finer-grained callbacks but lack the method invocation context.
Like with MethodRetryEvent, our assumption is that failure logging/metrics is much more common than fine-grained interception at each step of retry/transaction processing. Also, such a logging/metrics arrangements specifically benefits from the availability of the method invocation context.