You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by GitBox <gi...@apache.org> on 2017/11/14 13:37:44 UTC

[GitHub] reta opened a new pull request #339: CXF-7544: Support @Context-based injection into proxied CDI beans

reta opened a new pull request #339: CXF-7544: Support @Context-based injection into proxied CDI beans
URL: https://github.com/apache/cxf/pull/339
 
 
   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.
   
   More broadly,iIn some circumstances (like using `@ApplicationScoped` annotation for example) the CDI runtime will create a proxy class for a particular bean. As the result, the CXF side is going to bind the particular provider metadata to this proxy instance. It looks logical and unambiguous.
   
   However, the interesting things are happening when CXF will try to inject contextual proxies (`@Context` annotations) into the provider instance. The injections are successful but the target object for them will be the proxy instance (not the real instance behind it). Consequently, at runtime, when the proxy delegates the call to a backing instance, all contextual proxies are null in there (simply put, not set).

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services