@@ -75,15 +75,13 @@ public ReactiveTransactionManager getTransactionManager() {
75
75
public <T > Flux <T > execute (TransactionCallback <T > action ) throws TransactionException {
76
76
return TransactionContextManager .currentContext ().flatMapMany (context -> {
77
77
Mono <ReactiveTransaction > status = this .transactionManager .getReactiveTransaction (this .transactionDefinition );
78
- return status .flatMapMany (it -> {
79
- // This is an around advice: Invoke the next interceptor in the chain.
80
- // This will normally result in a target object being invoked.
81
- // Need re-wrapping of ReactiveTransaction until we get hold of the exception
82
- // through usingWhen.
83
- return Flux .usingWhen (Mono .just (it ), action ::doInTransaction ,
84
- this .transactionManager ::commit , s -> Mono .empty ())
85
- .onErrorResume (ex -> rollbackOnException (it , ex ).then (Mono .error (ex )));
86
- });
78
+ // This is an around advice: Invoke the next interceptor in the chain.
79
+ // This will normally result in a target object being invoked.
80
+ // Need re-wrapping of ReactiveTransaction until we get hold of the exception
81
+ // through usingWhen.
82
+ return status .flatMapMany (it -> Flux .usingWhen (Mono .just (it ), action ::doInTransaction ,
83
+ this .transactionManager ::commit , s -> Mono .empty ())
84
+ .onErrorResume (ex -> rollbackOnException (it , ex ).then (Mono .error (ex ))));
87
85
})
88
86
.subscriberContext (TransactionContextManager .getOrCreateContext ())
89
87
.subscriberContext (TransactionContextManager .getOrCreateContextHolder ());
0 commit comments