[jax-rs-spec users] Re: custom _at_Context injection

From: Christian Kaltepoth <>
Date: Wed, 17 Dec 2014 18:46:56 +0100

> Currently there is no way to pass information from a filter to a
> resource. It would be cool if there was a method on
> ContainerRequestContext (or something) that could register a value that
> could be injected via @Context. For example:
> containerRequestContext.pushContext(IDToken.class, token);
> @Path
> public class Resource {
> @Context IDToken token;
> }
> Sounds good
> I will file a JIRA for this.
> In a CDI world, it should be possible to achieve this type of
> communication between filters and resources using the right scope and
> producers; not the easiest but possible I think.

I agree that this would be very useful. I think many people assume that
this can already be done with ContextResolvers although it is not. So it
would be great to have a portable way to achieve this.


Christian Kaltepoth