From acca039c8ab60e0d41eca00edd510dc590168b3b Mon Sep 17 00:00:00 2001 From: Clement Escoffier Date: Thu, 20 Feb 2020 09:02:41 +0100 Subject: [PATCH] Improve the Transactional Interceptor to handle other Publisher types Converters should also be searched for Publisher instances, or you won't be able to re-create the Publisher instance (Flux, Mono, Multi) after the async handling. --- .../jta/runtime/interceptor/TransactionalInterceptorBase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/narayana-jta/runtime/src/main/java/io/quarkus/narayana/jta/runtime/interceptor/TransactionalInterceptorBase.java b/extensions/narayana-jta/runtime/src/main/java/io/quarkus/narayana/jta/runtime/interceptor/TransactionalInterceptorBase.java index 337882fe8..e57a463e8 100644 --- a/extensions/narayana-jta/runtime/src/main/java/io/quarkus/narayana/jta/runtime/interceptor/TransactionalInterceptorBase.java +++ b/extensions/narayana-jta/runtime/src/main/java/io/quarkus/narayana/jta/runtime/interceptor/TransactionalInterceptorBase.java @@ -125,7 +125,7 @@ public abstract class TransactionalInterceptorBase implements Serializable { if (!throwing && ret != null) { ReactiveTypeConverter converter = null; if (ret instanceof CompletionStage == false - && ret instanceof Publisher == false) { + && (ret instanceof Publisher == false || ic.getMethod().getReturnType() != Publisher.class)) { @SuppressWarnings({ "rawtypes", "unchecked" }) Optional> lookup = Registry.lookup((Class) ret.getClass()); if (lookup.isPresent()) {