We are working on MicroProfile Rest Client 1.1 for SmallRye.
One of the requirements is to implement AsyncInvocationInterceptor, an
interceptor for asynchronous client invocation.
The interceptor has two methods (more details in ):
- prepareContext, executed in the thread that calls the client
- applyContext, executed in the thread that makes the request.
Moreover, there is a single instance of the interceptor per request (not
Does RestEasy have some feature that we could use to implement executing
the applyContext method? We couldn't find anything that would work for us
in the JAX-RS itself.
We implemented a wrapper for ExecutorService that decorates runnables with
code that calls the interceptor but we're hoping there may be a better
in my issue  I am facing a decision whether to include CDI stereotype
usage also in JAX-RS annotated methods. The problem is that to allow
stereotypes to be picked up by CDI they need to be placed on the producer
method or field  which means they need to be annotated by
*javax.enterprise.inject.Produces* annotation. This annotation already
clashes with JAX-RS *javax.ws.rs.Produces *and additionally impose problems
(ambiguous injection) when several methods with the same return type would
use stereotypes (I've created simple example at ). This is why I want to
ask for the community opinion whether or not should RestEasy support
stereotypes on JAX-RS methods.
JBoss Sustaining Engineering Team