[jira] [Commented] (CXF-7640) Create a form to set the use of Spring in the classHelper on a per client way

2018-05-10 Thread Osvaldo Pina (JIRA)

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

Osvaldo Pina commented on CXF-7640:
---

I found out that I need this to 3.1.16 too and added this version in the issue 
but I don't know if this is the right way to do it...
 

>  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
> Fix For: 3.1.16, 3.2.5
>
> 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)


[jira] [Commented] (CXF-7640) Create a form to set the use of Spring in the classHelper on a per client way

2018-04-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CXF-7640:
-

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

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/core/src/main/java/org/apache/cxf/common/util/ClassHelper.java 
b/core/src/main/java/org/apache/cxf/common/util/ClassHelper.java
index 4d7c9014270..91be9e8a0a9 100644
--- a/core/src/main/java/org/apache/cxf/common/util/ClassHelper.java
+++ b/core/src/main/java/org/apache/cxf/common/util/ClassHelper.java
@@ -19,6 +19,7 @@
 
 package org.apache.cxf.common.util;
 
+
 import java.lang.reflect.Proxy;
 
 import org.apache.cxf.Bus;
@@ -28,16 +29,21 @@
  *
  */
 public class ClassHelper {
+
+public static final String USE_DEFAULT_CLASS_HELPER = 
"org.apache.cxf.useDefaultClassHelpers";
+
 static final ClassHelper HELPER;
+static final ClassHelper DEFAULT_HELPER;
+
 static {
-HELPER = getClassHelper();
+DEFAULT_HELPER = new ClassHelper();
+HELPER = getClassHelper(DEFAULT_HELPER);
 }
 
-
 protected ClassHelper() {
 }
 
-private static ClassHelper getClassHelper() {
+private static ClassHelper getClassHelper(ClassHelper defaultHelper) {
 boolean useSpring = true;
 String s = 
SystemPropertyAction.getPropertyOrNull("org.apache.cxf.useSpringClassHelpers");
 if (!StringUtils.isEmpty(s)) {
@@ -50,7 +56,7 @@ private static ClassHelper getClassHelper() {
 // ignore
 }
 }
-return new ClassHelper();
+return defaultHelper;
 }
 
 protected Class getRealClassInternal(Object o) {
@@ -60,6 +66,7 @@ private static ClassHelper getClassHelper() {
 protected Class getRealClassFromClassInternal(Class cls) {
 return cls;
 }
+
 protected Object getRealObjectInternal(Object o) {
 return o instanceof Proxy ? Proxy.getInvocationHandler(o) : o;
 }
@@ -69,19 +76,38 @@ protected Object getRealObjectInternal(Object o) {
 }
 
 public static Class getRealClassFromClass(Class cls) {
-return HELPER.getRealClassFromClassInternal(cls);
+return getRealClassFromClass(null, cls);
+}
+
+public static Class getRealClassFromClass(Bus bus, Class cls) {
+bus = getBus(bus);
+return getContextClassHelper(bus).getRealClassFromClassInternal(cls);
 }
 
 public static Object getRealObject(Object o) {
-return HELPER.getRealObjectInternal(o);
+Bus bus = getBus(null);
+return getContextClassHelper(bus).getRealObjectInternal(o);
 }
 
 public static Class getRealClass(Bus bus, Object o) {
-bus = bus == null ? BusFactory.getThreadDefaultBus() : bus;
+bus = getBus(bus);
 if (bus != null && bus.getProperty(ClassUnwrapper.class.getName()) != 
null) {
-ClassUnwrapper unwrapper = 
(ClassUnwrapper)bus.getProperty(ClassUnwrapper.class.getName());
+ClassUnwrapper unwrapper = (ClassUnwrapper) 
bus.getProperty(ClassUnwrapper.class.getName());
 return unwrapper.getRealClass(o);
 }
-return HELPER.getRealClassInternal(o);
+return getContextClassHelper(bus).getRealClassInternal(o);
 }
+
+private static ClassHelper getContextClassHelper(Bus bus) {
+return (DEFAULT_HELPER == HELPER || checkUseDefaultClassHelper(bus)) ? 
DEFAULT_HELPER : HELPER;
+}
+
+private static Bus getBus(Bus bus) {
+return bus == null ? BusFactory.getThreadDefaultBus() : bus;
+}
+
+private static boolean checkUseDefaultClassHelper(Bus bus) {
+return bus != null && 
Boolean.TRUE.equals(bus.getProperty(USE_DEFAULT_CLASS_HELPER));
+}
+
 }
diff --git a/core/src/test/java/org/apache/cxf/common/util/ClassHelperTest.java 
b/core/src/test/java/org/apache/cxf/common/util/ClassHelperTest.java
new file mode 100644
index 000..dc3e184b82d
--- /dev/null
+++ b/core/src/test/java/org/apache/cxf/common/util/ClassHelperTest.java
@@ -0,0 +1,169 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to 

[jira] [Commented] (CXF-7640) Create a form to set the use of Spring in the classHelper on a per client way

2018-04-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CXF-7640:
-

reta commented on issue #387: [CXF-7640] Create a form to set the use of Spring 
in the classHelper …
URL: https://github.com/apache/cxf/pull/387#issuecomment-385118438
 
 
   Jenkins retest this please


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)


[jira] [Commented] (CXF-7640) Create a form to set the use of Spring in the classHelper on a per client way

2018-04-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CXF-7640:
-

reta commented on issue #387: [CXF-7640] Create a form to set the use of Spring 
in the classHelper …
URL: https://github.com/apache/cxf/pull/387#issuecomment-385118438
 
 
   retest this please


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)


[jira] [Commented] (CXF-7640) Create a form to set the use of Spring in the classHelper on a per client way

2018-04-26 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CXF-7640:
-

osvaldopina commented on issue #387: [CXF-7640] Create a form to set the use of 
Spring in the classHelper …
URL: https://github.com/apache/cxf/pull/387#issuecomment-384651595
 
 
   all suggested changes were done


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)


[jira] [Commented] (CXF-7640) Create a form to set the use of Spring in the classHelper on a per client way

2018-03-17 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CXF-7640:
-

reta commented on issue #387: [CXF-7640] Create a form to set the use of Spring 
in the classHelper …
URL: https://github.com/apache/cxf/pull/387#issuecomment-373930200
 
 
   @osvaldopina Could you please add at least one (better, a few) test case to 
make sure things are working as expected? Thanks.


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)


[jira] [Commented] (CXF-7640) Create a form to set the use of Spring in the classHelper on a per client way

2018-03-17 Thread ASF GitHub Bot (JIRA)

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

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_r175261686
 
 

 ##
 File path: core/src/main/java/org/apache/cxf/common/util/ClassHelper.java
 ##
 @@ -69,19 +76,44 @@ protected Object getRealObjectInternal(Object o) {
 }
 
 public static Class getRealClassFromClass(Class cls) {
-return HELPER.getRealClassFromClassInternal(cls);
+Bus bus = getBus(null);
+if (checkUseDefaultClassHelper(bus)) {
 
 Review comment:
   We could get rid of some duplication here:
   
   ```
   private static getContextClassHelper(Bus bus) {
   // We could check if DEFAULT_HELPER and HELPER  are referencing the same 
instance and than the bus property
   return (DEFAULT_HELPER == HELPER || checkUseDefaultClassHelper(bus)) ? 
DEFAULT_HELPER : HELPER;
   }
   ```


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)


[jira] [Commented] (CXF-7640) Create a form to set the use of Spring in the classHelper on a per client way

2018-03-17 Thread ASF GitHub Bot (JIRA)

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

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_r175261686
 
 

 ##
 File path: core/src/main/java/org/apache/cxf/common/util/ClassHelper.java
 ##
 @@ -69,19 +76,44 @@ protected Object getRealObjectInternal(Object o) {
 }
 
 public static Class getRealClassFromClass(Class cls) {
-return HELPER.getRealClassFromClassInternal(cls);
+Bus bus = getBus(null);
+if (checkUseDefaultClassHelper(bus)) {
 
 Review comment:
   We could get rid of some duplication here:
   
   
   private static getContextClassHelper(Bus bus) {
   // We could check if DEFAULT_HELPER and HELPER  are referencing the same 
instance and than the bus property
   return (DEFAULT_HELPER == HELPER || checkUseDefaultClassHelper(bus)) ? 
DEFAULT_HELPER : HELPER;
   }
   ```


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)


[jira] [Commented] (CXF-7640) Create a form to set the use of Spring in the classHelper on a per client way

2018-03-17 Thread ASF GitHub Bot (JIRA)

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

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_r175261573
 
 

 ##
 File path: core/src/main/java/org/apache/cxf/common/util/ClassHelper.java
 ##
 @@ -69,19 +76,44 @@ protected Object getRealObjectInternal(Object o) {
 }
 
 public static Class getRealClassFromClass(Class cls) {
 
 Review comment:
   I would suggest to add the overloaded method with accepts `Bus bus`, there 
are many places where it could be provided from context. What do you think?


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)


[jira] [Commented] (CXF-7640) Create a form to set the use of Spring in the classHelper on a per client way

2018-03-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)


[jira] [Commented] (CXF-7640) Create a form to set the use of Spring in the classHelper on a per client way

2018-03-17 Thread ASF GitHub Bot (JIRA)

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

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_r175261437
 
 

 ##
 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";
 
 Review comment:
   Could you please rename it to `org.apache.cxf.useDefaultClassHelpers`  to 
follow similar `Spring` property name, thanks.


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)


[jira] [Commented] (CXF-7640) Create a form to set the use of Spring in the classHelper on a per client way

2018-03-17 Thread ASF GitHub Bot (JIRA)

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

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_r175261417
 
 

 ##
 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;
 
 Review comment:
   Probably better name would be `DEFAULT_HELPER`?


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)


[jira] [Commented] (CXF-7640) Create a form to set the use of Spring in the classHelper on a per client way

2018-03-07 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CXF-7640:
-

deki commented on issue #387: [CXF-7640] Create a form to set the use of Spring 
in the classHelper …
URL: https://github.com/apache/cxf/pull/387#issuecomment-371408809
 
 
   Don't worry about the Jenkins build, the failure is caused by a flapping 
test not related to your changes.


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)


[jira] [Commented] (CXF-7640) Create a form to set the use of Spring in the classHelper on a per client way

2018-03-07 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CXF-7640:
-

osvaldopina commented on issue #387: [CXF-7640] Create a form to set the use of 
Spring in the classHelper …
URL: https://github.com/apache/cxf/pull/387#issuecomment-371256394
 
 
   The build was successful in my machine. My config is:
   
   - Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 
2017-10-18T05:58:13-02:00)
   
   - Java version: 1.8.0_72, vendor: Oracle Corporation
   
   - OS name: "mac os x", version: "10.12.6", arch: "x86_64", family: "mac"
   
   What is the jenkins build environment so I can try to reproduce it locally 
and fix the build problem?


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)


[jira] [Commented] (CXF-7640) Create a form to set the use of Spring in the classHelper on a per client way

2018-03-07 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CXF-7640:
-

osvaldopina opened a new 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
 
 
   …on a per client way


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)


[jira] [Commented] (CXF-7640) Create a form to set the use of Spring in the classHelper on a per client way

2018-02-09 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin commented on CXF-7640:
---

I've attached a basic patch which I can commit, Dan, others, have a look please.
I'd still recommend trying the properties option, these property would be 
passed to the client code (via main or with jaxrs:client), there will be no 
need to link the client code to ClassHelper

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


[jira] [Commented] (CXF-7640) Create a form to set the use of Spring in the classHelper on a per client way

2018-02-08 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin commented on CXF-7640:
---

The method might be called setDefaultClassHelper or similar because the use of 
Spring is an impl detail. Who will call this method, your client code ? 

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


[jira] [Commented] (CXF-7640) Create a form to set the use of Spring in the classHelper on a per client way

2018-02-08 Thread Osvaldo Pina (JIRA)

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

Osvaldo Pina commented on CXF-7640:
---

What about creating a per classloader solution? A static method can be created 
on ClassHelper to indicate that spring is not be used (for example 
ClassHelper.disableSpringAOP()). That call would trigger a new ClassHelper 
static instance creation.
 

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


[jira] [Commented] (CXF-7640) Create a form to set the use of Spring in the classHelper on a per client way

2018-02-08 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin commented on CXF-7640:
---

I guess it is doable but not sure how realistic it is. 
One option may be to update Spring helper to check 
PhaseInterceptorChain.getCurrentMessage() on whether 
"org.apache.cxf.useSpringClassHelpers" is explicitly set to false, if yes - 
then delegate to the 'basic' ClassHelper.  
But this is such a rare case so it seems having all the runtime which depends 
on Spring go via the 2 extra checks (get the current message 1st, if not null - 
get the contextual message property and check if it is not null which in fact 
will be null for most cases) seems a bit expensive.
The other option can be to consolidate on the same CXF version, I appreciate it 
may not be easy but probably the right way forward...
if you'd like, please experiment with the 1st option and if it works - submit 
PR for the team to review. Thanks


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


[jira] [Commented] (CXF-7640) Create a form to set the use of Spring in the classHelper on a per client way

2018-02-08 Thread Osvaldo Pina (JIRA)

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

Osvaldo Pina commented on CXF-7640:
---

 

Few years ago we develop here a framework to serialize rpc calls over http 
using cxf on the the server and client. The same annotated interface is used by 
server and client. Clients and servers can live in the same jvm but in diferent 
applications (EARs). The framework uses, in server applications, spring to 
inject dependencies but framework clients are constructed without any spring 
dependency because we canot control whitch spring version is beeing used. When 
we try to use framework clients in applications that have very old spring 
dependencies we get java.lang.NoSuchMethodError (java.lang.NoSuchMethodError: 
org.springframework.util.ClassUtils.isCglibProxyClass(Ljava/lang/Class;)Z). I 
would like to enable cxf spring use in server applications and disable in 
client applications. I'm afraid of disabling in the whole jvm and generate side 
effects on server applications.

Thanks a lot!

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


[jira] [Commented] (CXF-7640) Create a form to set the use of Spring in the classHelper on a per client way

2018-02-08 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin commented on CXF-7640:
---

Do you have a practical scenario where you'd like some CXF endpoints use 
SpringAopClassHelper and some the non-Spring one ?  Thanks

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