cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r810090 - /cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
Date Tue, 01 Sep 2009 15:16:49 GMT
Author: sergeyb
Date: Tue Sep  1 15:16:48 2009
New Revision: 810090

URL: http://svn.apache.org/viewvc?rev=810090&view=rev
Log:
JAXRS : Logging the client creation failures and wrapping the original exception

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=810090&r1=810089&r2=810090&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
Tue Sep  1 15:16:48 2009
@@ -20,10 +20,11 @@
 
 import java.net.URI;
 import java.util.Map;
+import java.util.logging.Logger;
 
-import javax.ws.rs.WebApplicationException;
 import javax.ws.rs.core.MultivaluedMap;
 
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.ProxyHelper;
 import org.apache.cxf.configuration.security.AuthorizationPolicy;
 import org.apache.cxf.endpoint.ConduitSelector;
@@ -39,6 +40,8 @@
 
 public class JAXRSClientFactoryBean extends AbstractJAXRSFactoryBean {
     
+    private static final Logger LOG = LogUtils.getL7dLogger(JAXRSClientFactoryBean.class);
+    
     private String username;
     private String password;
     private boolean inheritHeaders; 
@@ -110,7 +113,8 @@
             
             return client;
         } catch (Exception ex) {
-            throw new WebApplicationException();
+            LOG.severe(ex.getClass().getName() + " : " + ex.getLocalizedMessage());
+            throw new RuntimeException(ex);
         }
     }
     
@@ -146,7 +150,8 @@
                                      proxyImpl);
             }
         } catch (Exception ex) {
-            throw new WebApplicationException();
+            LOG.severe(ex.getClass().getName() + " : " + ex.getLocalizedMessage());
+            throw new RuntimeException(ex);
         }
         
         



Mime
View raw message