[jax-rs-spec users] Re: Request for comments: Injecting _at_XxxParam into entity providers

From: Bill Burke <>
Date: Thu, 4 Feb 2016 14:30:33 -0500

MBW, MBR, Interceptors, and Filters are all singletons. I have a ton of
implementations of these classses that do initialization at boot time.
@XXXParam annotations would require field injection which just would not
work with singletons.

So -1 unless you can provide a @Singleton annotation.

On 2/4/2016 2:01 PM, Markus KARG wrote:
> Experts,
> I'd like to discuss an idea with you. I don't actually propose to do
> this change in JAX-RS 2.1, but depending on the outcome of our
> discussion it might make sense to prepare our products for such an API
> change to be part of JAX-RS 2.2 or 3.0.
> What I like you to comment on is that I really miss using @XxxParam in
> entity providers.
> Example: Today I wrote a MessageBodyWrite which needs to know the
> value of a matrix param. I solved it by @Context UriParam and uses a
> rather lengthy chain of API calls to finally get it. How much smarter
> the solution would like if I just could use @MatrixParam instead!
> So I really would love to get rid of the restriction that @XxxParam
> works with resource class only, but in fact would like to allow its
> use on entity providers also.
> What do you think?
> -Markus

Bill Burke
JBoss, a division of Red Hat