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

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

reta commented on a change in pull request #418: CXF-7742 handling scopes in 
CdiResourceProvider
URL: https://github.com/apache/cxf/pull/418#discussion_r190079458
 
 

 ##########
 File path: 
integration/cdi/src/main/java/org/apache/cxf/cdi/CdiResourceProvider.java
 ##########
 @@ -62,6 +95,37 @@ public void releaseInstance(Message m, Object o) {
 
     @Override
     public boolean isSingleton() {
-        return !beanManager.isNormalScope(bean.getScope());
+        return singleton;
+    }
+
+    // warn: several impls use @Dependent == request so we should probably add 
a flag
+    private boolean isConsideredSingleton() {
+        return Singleton.class == bean.getScope() || Dependent.class == 
bean.getScope();
+    }
+
+    public abstract static class Lifecycle {
+        BeanManager beanManager;
+        Bean<?> bean;
+        Object instance;
 
 Review comment:
   The `instance` could be removed, right? Since `Lifecycle` for the singleton 
re-declares it .

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


> CdiResourceProvider is not thread safe
> --------------------------------------
>
>                 Key: CXF-7742
>                 URL: https://issues.apache.org/jira/browse/CXF-7742
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 3.2.4
>            Reporter: Romain Manni-Bucau
>            Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to