reta commented on a change in pull request #351: [CXF-7571] Adding support for 
CDI injection of @Context objects.
URL: https://github.com/apache/cxf/pull/351#discussion_r159132277
 
 

 ##########
 File path: 
systests/cdi/base/src/main/java/org/apache/cxf/systests/cdi/base/BookStoreVersion.java
 ##########
 @@ -22,20 +22,25 @@
 import javax.enterprise.context.RequestScoped;
 import javax.inject.Inject;
 import javax.ws.rs.GET;
-import javax.ws.rs.core.Context;
 import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 
+import org.apache.cxf.systests.cdi.base.context.CustomContext;
+
 @RequestScoped
 public class BookStoreVersion {
     @Inject
     private String version;
-    @Context
+    @Inject
     private HttpHeaders httpHeaders;
+    @Inject
 
 Review comment:
   @johnament I conducted a short debug session, it looks like it is working as 
expected / described, I see `DelegateContextAnnotatedType`, 
`ContextProducerBean` and finally `CustomContextImpl` being invoked in case 
when `CustomContext` is annotated with `@Context` annotation. Interesting, what 
is happening in your case ...

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to