cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r785651 - /cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
Date Wed, 17 Jun 2009 15:12:41 GMT
Author: sergeyb
Date: Wed Jun 17 15:12:40 2009
New Revision: 785651

URL: http://svn.apache.org/viewvc?rev=785651&view=rev
Log:
JAXRS : use context loader in case initial proxy creation fails

Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java?rev=785651&r1=785650&r2=785651&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
Wed Jun 17 15:12:40 2009
@@ -133,10 +133,17 @@
                                                             varValues);
             initClient(proxyImpl, ep);    
             
-            return (Client)ProxyHelper.getProxy(cri.getServiceClass().getClassLoader(),
+            try {
+                return (Client)ProxyHelper.getProxy(cri.getServiceClass().getClassLoader(),
                                         new Class[]{cri.getServiceClass(), Client.class,

                                                     InvocationHandlerAware.class}, 
                                         proxyImpl);
+            } catch (Exception ex) {
+                return (Client)ProxyHelper.getProxy(Thread.currentThread().getContextClassLoader(),
+                                                    new Class[]{cri.getServiceClass(), Client.class,

+                                                                InvocationHandlerAware.class},

+                                     proxyImpl);
+            }
         } catch (Exception ex) {
             throw new WebApplicationException();
         }



Mime
View raw message