cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1521983 - /cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java
Date Wed, 11 Sep 2013 18:59:02 GMT
Author: dkulp
Date: Wed Sep 11 18:59:02 2013
New Revision: 1521983

URL: http://svn.apache.org/r1521983
Log:
The service class classloader must be part of the loader.

Modified:
    cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java

Modified: cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java?rev=1521983&r1=1521982&r2=1521983&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java
(original)
+++ cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java
Wed Sep 11 18:59:02 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