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

Romain Manni-Bucau edited comment on CXF-7544 at 10/29/17 6:09 PM:
-------------------------------------------------------------------

Think we also have the case of a standard provider with @Context as constructor 
param but @Inject fields (so the bean is not a cdi bean but uses cdi beans)


was (Author: romain.manni-bucau):
Think also have the case of a standard provider with @Context as constructor 
param but @Inject fields (so the bean is not a cdi bean but uses cdi beans)

> Support @Context-based injection into proxied CDI beans
> -------------------------------------------------------
>
>                 Key: CXF-7544
>                 URL: https://issues.apache.org/jira/browse/CXF-7544
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 3.1.13, 3.2.0
>            Reporter: Andriy Redko
>            Assignee: Andriy Redko
>
> The issue pop up as part of https://github.com/apache/cxf/pull/330 
> discussion. In case when provider / feature / resource is a proxied CDI bean, 
> the contextual class members (annotated with @Context) are not injected.
> Test case to reproduce:
> {code}
> @ApplicationScoped
> public class BookStoreRequestFilter implements ContainerRequestFilter {
>     @Context private ResourceInfo resourceInfo;
>     
>     @Override
>     public void filter(ContainerRequestContext requestContext) throws 
> IOException {
>         // Contextual instances should be injected independently
>         if (resourceInfo == null || resourceInfo.getResourceMethod() == null) 
> {
>             requestContext.abortWith(Response.serverError().build());
>         }
>     }
> }
> {code}
> CC [~rmannibucau]



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to