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

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

My project is using Spring beans. But the Spring bean doesn't seem to require 
setters for @Context injection.

I've provided a test case here:

http://scm.ops4j.org/repos/ops4j/laboratory/users/ceefour/cxf-context-bug

Then test the following URLs:

http://localhost:8080/cxf-context-bug/test1
http://localhost:8080/cxf-context-bug/test2
http://localhost:8080/cxf-context-bug/group/test1
http://localhost:8080/cxf-context-bug/group/test2

Of all, the "http://localhost:8080/cxf-context-bug/group/test1"; fails. Which is 
supposed to be injecting a subresource.

Let me know if I'm doing anything wrong.

On a different matter, I think that sample project is good for a CXF JAX-RS 
quickstart archetype :-)

> @Context does not work for JAX-RS member fields
> -----------------------------------------------
>
>                 Key: CXF-2335
>                 URL: https://issues.apache.org/jira/browse/CXF-2335
>             Project: CXF
>          Issue Type: Bug
>          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