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

ASF GitHub Bot commented on CXF-7132:
-------------------------------------

Github user johnament commented on the issue:

    https://github.com/apache/cxf/pull/195
  
    @rmannibucau you are correct, there is a regression problem with non-normal 
scoped beans.  The code works.  Specifically for dependent and singleton, since 
they're not using proxies, the instance you get back is the same.  This 
essentially makes dependent == singleton.
    
    You can see that the test does include both normal scoped and dependent 
beans 
https://github.com/johnament/cxf/tree/81e9215b75c02a6b108e94f474b9aa6011c8f00c/systests/cdi/base/src/main/java/org/apache/cxf/systests/cdi/base
 - look at BookStore and VersionService as examples.
    
    The code does work, but I would expect a per-request pattern to be used for 
dependent.  More refinement required to clean up this CDI integration.


> CDI Multi-app tests fail when classes have scope
> ------------------------------------------------
>
>                 Key: CXF-7132
>                 URL: https://issues.apache.org/jira/browse/CXF-7132
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 3.1.9
>            Reporter: John D. Ament
>             Fix For: 3.1.9
>
>
> The multi-app tests fail due how to instances are managed in proxyable 
> environments.  When a normal scoped CDI Bean is used, the class is wrong.  
> CXF is referencing the real class and getting a per-request instance of a 
> CdiResourceProvider based instance.  This causes fields to not be injected.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to