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

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

reta commented on a change in pull request #387: [CXF-7640] Create a form to 
set the use of Spring in the classHelper …
URL: https://github.com/apache/cxf/pull/387#discussion_r175261539
 
 

 ##########
 File path: core/src/main/java/org/apache/cxf/common/util/ClassHelper.java
 ##########
 @@ -28,9 +28,15 @@
  *
  */
 public class ClassHelper {
+
+    public static final String USE_DEFAULT_CLASS_HELPER = 
"org.apache.cxf.useDefaultClassHelper";
+
     static final ClassHelper HELPER;
+    static final ClassHelper CXF_HELPER;
+
     static {
         HELPER = getClassHelper();
 
 Review comment:
   I think more often than not we will create 2 instances of `ClassHelper` 
(HELPER  and DEFAULT_HELPER would be the same), I would suggest to do that:
   
   ```
   DEFAULT_HELPER = new ClassHelper();
   HELPER = getClassHelper(DEFAULT_HELPER);
   ```
   And
   
   ```
   private static ClassHelper getClassHelper(ClassHelper defaultHelper) {
    ...
       return defaultHelper;
   }
   ```
   
   So we would be using the same instance in case Spring helpers are not being 
asked for.

----------------------------------------------------------------
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


>  Create a form to set the use of Spring in the classHelper on a per client way
> ------------------------------------------------------------------------------
>
>                 Key: CXF-7640
>                 URL: https://issues.apache.org/jira/browse/CXF-7640
>             Project: CXF
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Osvaldo Pina
>            Priority: Major
>         Attachments: cxf7640.txt
>
>
> The solution for CXF-6191 allows for configuration of the use of Spring in 
> ClassHelper in a per vm way via System property. Would be nice to have a way 
> to configure it in a per instance way (or, at least, in a per classloader way)
>  
>   
>   
>   
>   
>  



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

Reply via email to