cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1073820 - in /cxf/branches/2.3.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactory.java rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
Date Wed, 23 Feb 2011 16:46:25 GMT
Author: dkulp
Date: Wed Feb 23 16:46:24 2011
New Revision: 1073820

URL: http://svn.apache.org/viewvc?rev=1073820&view=rev
Log:
Merged revisions 1073385 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1073385 | sergeyb | 2011-02-22 11:24:57 -0500 (Tue, 22 Feb 2011) | 1 line
  
  JAX-RS: minimize the excessive logging in case of client models
........

Modified:
    cxf/branches/2.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactory.java
    cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java

Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactory.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactory.java?rev=1073820&r1=1073819&r2=1073820&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactory.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactory.java
Wed Feb 23 16:46:24 2011
@@ -187,6 +187,7 @@ public final class JAXRSClientFactory {
         JAXRSClientFactoryBean bean = WebClient.getBean(baseAddress, configLocation);
         bean.setProviders(providers);
         bean.setModelRef(modelRef);
+        bean.setServiceClass(cls);
         return bean.create(cls);
     }
     
@@ -204,6 +205,7 @@ public final class JAXRSClientFactory {
         JAXRSClientFactoryBean bean = WebClient.getBean(baseAddress, null);
         bean.setProviders(providers);
         bean.setModelRef(modelRef);
+        bean.setServiceClass(cls);
         if (threadSafe) {
             bean.setInitialState(new ThreadLocalClientState(baseAddress));
         }
@@ -233,8 +235,10 @@ public final class JAXRSClientFactory {
     public static <T> T createFromModel(String baseAddress, Class<T> cls, List<UserResource>
modelBeans,
                                List<?> providers, String configLocation) {
         JAXRSClientFactoryBean bean = WebClient.getBean(baseAddress, configLocation);
+        
         bean.setProviders(providers);
         bean.setModelBeans(modelBeans);
+        bean.setServiceClass(cls);
         return bean.create(cls);
     }
     

Modified: cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java?rev=1073820&r1=1073819&r2=1073820&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
Wed Feb 23 16:46:24 2011
@@ -31,6 +31,7 @@ import java.util.Date;
 import java.util.List;
 import java.util.Map;
 import java.util.ResourceBundle;
+import java.util.logging.Level;
 import java.util.logging.Logger;
 
 import javax.servlet.http.HttpServletResponse;
@@ -237,7 +238,9 @@ public class JAXRSOutInterceptor extends
         Object entity = getEntity(responseObj);
         try {
             responseType = checkFinalContentType(responseType);
-            LOG.fine("Response content type is: " + responseType.toString());
+            if (LOG.isLoggable(Level.FINE)) {
+                LOG.fine("Response content type is: " + responseType.toString());
+            }
             message.put(Message.CONTENT_TYPE, responseType.toString());
             
             long size = writer.getSize(entity, targetType, genericType, annotations, responseType);
@@ -246,8 +249,9 @@ public class JAXRSOutInterceptor extends
                          + writer.getClass().getName());
                 responseHeaders.putSingle(HttpHeaders.CONTENT_LENGTH, Long.toString(size));
             }
-            
-            LOG.fine("Response EntityProvider is: " + writer.getClass().getName());
+            if (LOG.isLoggable(Level.FINE)) {
+                LOG.fine("Response EntityProvider is: " + writer.getClass().getName());
+            }
             try {
                 writer.writeTo(entity, targetType, genericType, 
                                annotations, 



Mime
View raw message