cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject svn commit: r766619 - /cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandler.java
Date Mon, 20 Apr 2009 08:38:54 GMT
Author: davidb
Date: Mon Apr 20 08:38:53 2009
New Revision: 766619

URL: http://svn.apache.org/viewvc?rev=766619&view=rev
Log:
Fix for bug CXF-2176

Modified:
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandler.java

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandler.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandler.java?rev=766619&r1=766618&r2=766619&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandler.java
(original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandler.java
Mon Apr 20 08:38:53 2009
@@ -58,6 +58,7 @@
         LOG.info("Creating a " + sd.getProvidedInterfaces().toArray()[0]
                 + " client, endpoint address is " + address);
 
+        ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
         try {
             ClientProxyFactoryBean factory = createClientProxyFactoryBean();
             factory.setServiceClass(iClass);
@@ -70,11 +71,14 @@
                          factory.getClientFactoryBean(), 
                          sd);
 
+            Thread.currentThread().setContextClassLoader(ClientProxyFactoryBean.class.getClassLoader());
             Object proxy = getProxy(factory.create(), iClass);
             getDistributionProvider().addRemoteService(serviceReference);
             return proxy;
         } catch (Exception e) {
             LOG.log(Level.WARNING, "proxy creation failed", e);
+        } finally {
+            Thread.currentThread().setContextClassLoader(oldClassLoader);
         }
         return null;
     }



Mime
View raw message