mirror of
https://github.com/jlengrand/quarkus.git
synced 2026-03-10 08:41:22 +00:00
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.
This commit is contained in:
@@ -125,7 +125,7 @@ public abstract class TransactionalInterceptorBase implements Serializable {
|
||||
if (!throwing && ret != null) {
|
||||
ReactiveTypeConverter<Object> converter = null;
|
||||
if (ret instanceof CompletionStage == false
|
||||
&& ret instanceof Publisher == false) {
|
||||
&& (ret instanceof Publisher == false || ic.getMethod().getReturnType() != Publisher.class)) {
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
Optional<ReactiveTypeConverter<Object>> lookup = Registry.lookup((Class) ret.getClass());
|
||||
if (lookup.isPresent()) {
|
||||
|
||||
Reference in New Issue
Block a user