[jax-rs-spec users] Re: Nested BeanParams

From: Markus KARG <>
Date: Tue, 6 Oct 2015 19:28:45 +0200

I think we should look at the spec from a different angle: It clearly defines what the annotation "@BeanParams" is good for and where it is to be used. If that matches on the nested bean class, it is a valid use that MUST be supported.


From: Sergey Beryozkin []
Sent: Dienstag, 6. Oktober 2015 11:16
Subject: Re: Nested BeanParams


Ok, I did some home work, the related text at

says nothing about nested BeanParams, example:

"@BeanParam <> can contain all parameters injections injections (@PathParam <> , @QueryParam <> , @MatrixParam <> , @HeaderParam <> , @CookieParam <> , @FormParam <> )."

but does not specify the possible use of nested @BeanParams.

I guess I'm OK about having nested @BeanParams supported, but I'm still curious if it is RI-specific only or not.
Marek, can you please be nice again and clarify :-) ? I can open a minor documentation issue to clarify the use of BeanParam ?


On 05/10/15 17:54, Sergey Beryozkin wrote:


We have an issue reported related to the fact that no nested BeanParams are supported in CXF,
where a top level @BeanParam POJO has one of its methods/properties also annotated with @BeanParam, example:

public class A {
   @Context HttpHeaders headers;
   @BeanParam B b;

public class B {
   @QueryParam String someQueryParam;

public Response get(@BeanParam A a);

Marek, can you please confirm it is supposed to work ?
BeanParam docs can indeed be read such that nested BeanParams are expected to work, though it seems a bit too complex.
The user has confirmed it works in Jersey - but is it RI specific or very much spec compliant ?

Thanks, Sergey