cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1521984 - /cxf/branches/2.7.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java
Date Wed, 11 Sep 2013 19:03:34 GMT
Author: dkulp
Date: Wed Sep 11 19:03:33 2013
New Revision: 1521984

URL: http://svn.apache.org/r1521984
Log:
Merged revisions 1521983 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1521983 | dkulp | 2013-09-11 14:59:02 -0400 (Wed, 11 Sep 2013) | 2 lines

  The service class classloader must be part of the loader.

........

Modified:
    cxf/branches/2.7.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java

Modified: cxf/branches/2.7.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java?rev=1521984&r1=1521983&r2=1521984&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java
Wed Sep 11 19:03:33 2013
@@ -32,6 +32,7 @@ import org.apache.cxf.binding.BindingCon
 import org.apache.cxf.common.classloader.ClassLoaderUtils;
 import org.apache.cxf.common.classloader.ClassLoaderUtils.ClassLoaderHolder;
 import org.apache.cxf.common.injection.NoJSR250Annotations;
+import org.apache.cxf.common.util.ProxyClassLoader;
 import org.apache.cxf.common.util.ProxyHelper;
 import org.apache.cxf.configuration.Configurer;
 import org.apache.cxf.configuration.security.AuthorizationPolicy;
@@ -172,6 +173,13 @@ public class ClientProxyFactoryBean exte
     
             Class<?> classes[] = getImplementingClasses();
             
+            if (loader != null && loader != clientFactoryBean.getServiceClass().getClassLoader())
{
+                ProxyClassLoader pcl = new ProxyClassLoader();
+                pcl.addLoader(clientFactoryBean.getServiceClass().getClassLoader());
+                pcl.addLoader(loader);
+                loader = pcl;
+            }
+            
             Object obj = ProxyHelper.getProxy(loader == null 
                     ? clientFactoryBean.getServiceClass().getClassLoader()
                         : loader,



Mime
View raw message