Injecting HttpHeaders into ClientRequestFilter (with @Context)
by Michal Szynkiewicz
Hi,
The MP Rest Client 1.2 TCK assumes the ${subject} should be possible but
I'm getting "RESTEASY003880: Unable to find contextual data of type:
javax.ws.rs.core.HttpHeaders" when I try.
I think it's possible to add an implementation of HttpHeaders to
ResteasyProviderFactory.getContextDataMap(), and then make the headers from
it populated to the request with a filter but is there a better way? Maybe
some add-on that would make it work out of the box? ;)
Thanks,
Michał
5 years, 10 months
Question about how we do injections
by Ron Sigal
I've been looking at an old issue, RESTEASY-1709 "Same JAX-RS Provider
instance injected across applications", which I thought I had solved by
injecting a javassist created proxy, but the reporter couldn't get it to
work so it's been sitting for almost a year.
Anyway, I've been trying to port the old code to master, and I see that
injection has changed to do a lot of stuff with CompletableFutures. In
particular, a series of injections into, say, a resource, becomes a
composition of CompletionStages, each one doing a single injection. I'm
trying to understand why.
One reason I can see is that, at least in the case of an asynchronous
invocation, you want to do as little as possible before returning a
CompletableFuture. That would provide better responsiveness. But I have
two questions:
1. Is constructing a CompletableFuture that much faster than just
doing the injection?
2. I don't how much space a CompletableFuture takes, but we've turned
a simple loop into a collection of CompletableFutures, which would seem
to occupy more space. Isn't that counterproductive in terms of our
general mandate to create a smaller footprint for container applications?
I'm not saying that the new code is wrong. I'm just saying that I don't
understand why it's right.
Any thoughts?
--
My company's smarter than your company (unless you work for Red Hat)
5 years, 11 months
Multiple Applications in a WAR
by Ron Sigal
There is a discussion on the jaxrs-dev mailing list about having
multiple Application objects in a single WAR.
Does anyone know of any real world use cases for that?
-Ron
--
My company's smarter than your company (unless you work for Red Hat)
5 years, 11 months