[ 
https://issues.apache.org/jira/browse/CXF-2335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12729174#action_12729174
 ] 

Hendy Irawan commented on CXF-2335:
-----------------------------------

So the problem becomes:

class RootResource {

@Path("sub")
public SubResource getSub() {
  return new SubResource();
}

}

and in SubResource:

class SubResource {

@Context
private UriInfo context;

}

where CXF doesn't inject the fields of SubResource instance returned by 
RootResource.getSub(). However, individual methods within that SubResource 
instance is injected properly.

> Support @Context injection for JAX-RS Subresources
> --------------------------------------------------
>
>                 Key: CXF-2335
>                 URL: https://issues.apache.org/jira/browse/CXF-2335
>             Project: CXF
>          Issue Type: Improvement
>          Components: REST
>    Affects Versions: 2.2.2
>            Reporter: Hendy Irawan
>
> This works in Jersey, but not in CXF:
> class ........ {
> @Context
> private UriInfo context;
> }
> The alternative, works on both CXF and Jersey:
> class ...... {
> @GET
> public void something(@Context UriInfo context) {
>   ...
> }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to