[ https://issues.apache.org/jira/browse/CXF-7571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16266850#comment-16266850 ]
John D. Ament commented on CXF-7571: ------------------------------------ Sergey, no, that's not what I am suggesting. In the CDI extension, find any managed bean that declares a {{@Context}}, and update the underlying {{Annotated}} object to add {{@Inject}} to the annotations. CDI exposes {{AnnotatedField}}, {{AnnotatedMethod}}, {{AnnotatedParameter}} for these use cases. For instance, if a method param is annotated {{@Context}} you'll need to add {{@Inject}} to the method. What will be curious is how to handle {{@Context}} in a service method. I did something like that recently for a custom event model I was implementing. This would allow CDI to take over the injection of the field, since it'll have the JSR-330 annotation. I think Andriy has my point. It makes it so that CXF doesn't have to do anything (other than register additional beans). > Revamp of the CXF injection implementation > ------------------------------------------- > > Key: CXF-7571 > URL: https://issues.apache.org/jira/browse/CXF-7571 > Project: CXF > Issue Type: Improvement > Reporter: Andriy Redko > Assignee: Andriy Redko > > As more deep integration with CDI revealed, there are complexities in > bringing together `@Context`- and `@Inject`-based injections. Encapsulating > CXF injection implementation and than delegating the hard work to appropriate > strategy (CDI, Spring, ...) would be the right solution to address the > problem at its roots. -- This message was sent by Atlassian JIRA (v6.4.14#64029)