diff --git a/extensions/resteasy-reactive/quarkus-resteasy-reactive/runtime/src/main/java/io/quarkus/resteasy/reactive/server/runtime/ResteasyReactiveRecorder.java b/extensions/resteasy-reactive/quarkus-resteasy-reactive/runtime/src/main/java/io/quarkus/resteasy/reactive/server/runtime/ResteasyReactiveRecorder.java index 3a74e78586a49..3758bbc0ee5f6 100644 --- a/extensions/resteasy-reactive/quarkus-resteasy-reactive/runtime/src/main/java/io/quarkus/resteasy/reactive/server/runtime/ResteasyReactiveRecorder.java +++ b/extensions/resteasy-reactive/quarkus-resteasy-reactive/runtime/src/main/java/io/quarkus/resteasy/reactive/server/runtime/ResteasyReactiveRecorder.java @@ -77,6 +77,13 @@ public Executor get() { } }; + public static final Supplier VTHREAD_EXECUTOR_SUPPLIER = new Supplier() { + @Override + public Executor get() { + return VirtualThreadsRecorder.getCurrent(); + } + }; + static volatile Deployment currentDeployment; public static Deployment getCurrentDeployment() { @@ -129,7 +136,7 @@ public ResteasyReactiveRequestContext createContext(Deployment deployment, } RuntimeDeploymentManager runtimeDeploymentManager = new RuntimeDeploymentManager(info, EXECUTOR_SUPPLIER, - VirtualThreadsRecorder::getCurrent, + VTHREAD_EXECUTOR_SUPPLIER, closeTaskHandler, contextFactory, new ArcThreadSetupAction(beanContainer.requestContext()), vertxConfig.rootPath); Deployment deployment = runtimeDeploymentManager.deploy();