-
Bug
-
Resolution: Done
-
Major
-
4.0.0.Beta1
-
None
-
None
Given resource method
@GET
@Path("test")
@Produces("text/plain")
public CompletionStage<String> text(@Context HttpRequest req) {
System.out.println("application (inline): " + ResteasyProviderFactory.getContextData(Application.class));
CompletableFuture<String> cs = new CompletableFuture<>();
ExecutorService executor = Executors.newSingleThreadExecutor();
executor.submit(
new Runnable() {
public void run() {
System.out.println("application (async): " + ResteasyProviderFactory.getContextData(Application.class));
cs.complete("hello");
}
});
return cs;
}
the output will be something like
application (inline): org.jboss.resteasy.experiment.undertow.TestCompletionStage$TestApp@72d370fa
application (async): null