cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r502363 - in /incubator/cxf/trunk: ./ api/src/main/java/org/apache/cxf/ api/src/main/java/org/apache/cxf/phase/ common/common/src/main/java/org/apache/cxf/common/logging/ common/common/src/test/java/org/apache/cxf/common/logging/ distributi...
Date Thu, 01 Feb 2007 21:16:56 GMT
Author: dkulp
Date: Thu Feb  1 13:16:55 2007
New Revision: 502363

URL: http://svn.apache.org/viewvc?view=rev&rev=502363
Log:
Bunch of logging updates plus others

* Remove log4j.properties from kits.  We don't ship log4j so we don't need it
* Update LogUtils to use a LogRecord with populated source class/method so messages logged
through it will match messages logged directly to the logger
* Change a bunch of loggings from INFO to FINE (CXF-368)
* Change a bunch of loggings to use LogUtils instead of doing the i18n stuff themselves
* Add exclusions to things in dependencyManagement to once again get log4j off the test classpaths
* Update javadoc for BusFactory
* Make bus.shutdown() unset the default bus if that bus is the default bus


Removed:
    incubator/cxf/trunk/distribution/src/main/release/etc/log4j.properties
Modified:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java
    incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/logging/LogUtils.java
    incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/common/logging/LogUtilsTest.java
    incubator/cxf/trunk/distribution/src/main/release/samples/common_build.xml
    incubator/cxf/trunk/pom.xml
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/CXFBusImpl.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContext.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/JaxbClassPathXmlApplicationContext.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/URIMappingInterceptor.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/AbstractConduit.java
    incubator/cxf/trunk/rt/frontend/jaxws/pom.xml
    incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/JettyHTTPDestination.java
    incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf/transport/http/JettyHTTPDestination.java
    incubator/cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java?view=diff&rev=502363&r1=502362&r2=502363
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java Thu Feb  1 13:16:55
2007
@@ -22,7 +22,6 @@
 import java.io.BufferedReader;
 import java.io.InputStream;
 import java.io.InputStreamReader;
-import java.util.Map;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
@@ -54,7 +53,17 @@
      * @return the default bus.
      */
     public static synchronized Bus getDefaultBus() {
-        if (defaultBus == null) {
+        return getDefaultBus(true);
+    }
+    
+    /**
+     * Returns the default bus
+     * @param createIfNeeded Set to true to create a default bus if one doesn't exist
+     * @return the default bus.
+     */
+    public static synchronized Bus getDefaultBus(boolean createIfNeeded) {
+        if (defaultBus == null
+            && createIfNeeded) {
             defaultBus = newInstance().createBus();
         }
         return defaultBus;
@@ -81,15 +90,31 @@
         return false;
     }
 
-    
+    /**
+     * Create a new BusFactory
+     * 
+     * The class of the BusFactory is determined by looking for the system propery: 
+     * org.apache.cxf.bus.factory
+     * or by searching the classpath for:
+     * META-INF/services/org.apache.cxf.bus.factory
+     * 
+     * @return a new BusFactory to be used to create Bus objects
+     */
     public static BusFactory newInstance() {
         return newInstance(null);
     }
+    
+    /**
+     * Create a new BusFactory
+     * @param className The class of the BusFactory to create.  If null, uses the
+     * default search algorithm.
+     * @return a new BusFactory to be used to create Bus objects
+     */
     public static BusFactory newInstance(String className) {
         BusFactory instance = null;
         ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
         if (className == null) {
-            className = getBusFactoryClass(null, classLoader);
+            className = getBusFactoryClass(classLoader);
         }
         Class<? extends BusFactory> busFactoryClass;
         try {
@@ -101,17 +126,9 @@
         return instance;
     }
     
-    private static String getBusFactoryClass(Map<String, Object> properties, ClassLoader
classLoader) {
+    private static String getBusFactoryClass(ClassLoader classLoader) {
         
         String busFactoryClass = null;
-        
-        // check properties  
-        if (null != properties) {
-            busFactoryClass = (String)properties.get(BusFactory.BUS_FACTORY_PROPERTY_NAME);
-            if (isValidBusFactoryClass(busFactoryClass)) {
-                return busFactoryClass;
-            }
-        }
         
         // next check system properties
         busFactoryClass = System.getProperty(BusFactory.BUS_FACTORY_PROPERTY_NAME);

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java?view=diff&rev=502363&r1=502362&r2=502363
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java
(original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java
Thu Feb  1 13:16:55 2007
@@ -169,8 +169,8 @@
                     }
  
                     faultOccured = true;
-                    if (LOG.isLoggable(Level.INFO)) {
-                        LogUtils.log(LOG, Level.INFO, "Interceptor has thrown exception,
unwinding now", ex);
+                    if (LOG.isLoggable(Level.FINE)) {
+                        LogUtils.log(LOG, Level.FINE, "Interceptor has thrown exception,
unwinding now", ex);
                     }
                     message.setContent(Exception.class, ex);
                     if (message.getExchange() != null) {
@@ -241,7 +241,7 @@
     private void unwind(Message message) {
         while (iterator.hasPrevious()) {
             Interceptor currentInterceptor = iterator.previous();
-            if (LOG.isLoggable(Level.INFO)) {
+            if (LOG.isLoggable(Level.FINE)) {
                 LOG.fine("Invoking handleFault on interceptor " + currentInterceptor);
             }
             currentInterceptor.handleFault(message);

Modified: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/logging/LogUtils.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/logging/LogUtils.java?view=diff&rev=502363&r1=502362&r2=502363
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/logging/LogUtils.java
(original)
+++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/logging/LogUtils.java
Thu Feb  1 13:16:55 2007
@@ -22,6 +22,7 @@
 import java.text.MessageFormat;
 import java.util.ResourceBundle;
 import java.util.logging.Level;
+import java.util.logging.LogRecord;
 import java.util.logging.Logger;
 
 import org.apache.cxf.common.i18n.BundleUtils;
@@ -78,7 +79,7 @@
         if (logger.isLoggable(level)) {
             final String formattedMessage = 
                 MessageFormat.format(localize(logger, message), parameter);
-            logger.log(level, formattedMessage, throwable);
+            doLog(logger, level, formattedMessage, throwable);
         }
     }
 
@@ -99,7 +100,7 @@
         if (logger.isLoggable(level)) {
             final String formattedMessage = 
                 MessageFormat.format(localize(logger, message), parameters);
-            logger.log(level, formattedMessage, throwable);
+            doLog(logger, level, formattedMessage, throwable);
         }
     }
  
@@ -116,7 +117,7 @@
         if (logger.isLoggable(level)) {
             final String formattedMessage = 
                 MessageFormat.format(localize(logger, message), NO_PARAMETERS);
-            logger.log(level, formattedMessage);
+            doLog(logger, level, formattedMessage, null);
         }
         
     }    
@@ -151,11 +152,36 @@
         if (logger.isLoggable(level)) {
             final String formattedMessage = 
                 MessageFormat.format(localize(logger, message), parameters);
-            logger.log(level, formattedMessage);
+            doLog(logger, level, formattedMessage, null);
         }
         
     }
 
+    private static void doLog(Logger log, Level level, String msg, Throwable t) {
+        LogRecord record = new LogRecord(level, msg);
+    
+        record.setLoggerName(log.getName());
+        record.setResourceBundleName(log.getResourceBundleName());
+        record.setResourceBundle(log.getResourceBundle());
+            
+        if (t != null) {
+            record.setThrown(t);
+        }
+        
+        //try to get the right class name/method name - just trace
+        //back the stack till we get out of this class
+        StackTraceElement stack[] = (new Throwable()).getStackTrace();
+        String cname = LogUtils.class.getName();
+        for (int x = 0; x < stack.length; x++) {
+            StackTraceElement frame = stack[x];
+            if (!frame.getClassName().equals(cname)) {
+                record.setSourceClassName(frame.getClassName());
+                record.setSourceMethodName(frame.getMethodName());
+                break;
+            }
+        }
+        log.log(record);
+    }
 
     /**
      * Retreive localized message retreived from a logger's resource
@@ -168,8 +194,5 @@
         ResourceBundle bundle = logger.getResourceBundle();
         return bundle != null ? bundle.getString(message) : message;
     }
-
-
-
 
 }

Modified: incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/common/logging/LogUtilsTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/common/logging/LogUtilsTest.java?view=diff&rev=502363&r1=502362&r2=502363
==============================================================================
--- incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/common/logging/LogUtilsTest.java
(original)
+++ incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/common/logging/LogUtilsTest.java
Thu Feb  1 13:16:55 2007
@@ -58,6 +58,7 @@
         EasyMock.replay(handler);
         LOG.log(Level.WARNING, "FOOBAR_MSG");
         EasyMock.verify(handler);
+        LOG.removeHandler(handler);
     }
 
     public void testLogParamSubstitutionWithThrowable() throws Exception {
@@ -72,6 +73,7 @@
         EasyMock.replay(handler);
         LogUtils.log(LOG, Level.SEVERE, "SUB1_MSG", ex, 1);
         EasyMock.verify(handler);
+        LOG.removeHandler(handler);
     }
 
     public void testLogParamsSubstitutionWithThrowable() throws Exception {
@@ -86,8 +88,41 @@
         EasyMock.replay(handler);
         LogUtils.log(LOG, Level.SEVERE, "SUB2_MSG", ex, new Object[] {3, 4});
         EasyMock.verify(handler);
+        LOG.removeHandler(handler);
     }
 
+    public void testClassMethodNames() throws Exception {
+        TestLogHandler handler = new TestLogHandler();
+        LOG.addHandler(handler);
+
+        // logger called directly
+        LOG.warning("hello");
+        
+        String cname = handler.cname;
+        String mname = handler.mname;
+        
+        // logger called through LogUtils
+        LogUtils.log(LOG, Level.WARNING,  "FOOBAR_MSG");
+        
+        assertEquals(cname, handler.cname);
+        assertEquals(mname, handler.mname);
+    }
+    
+    private static final class TestLogHandler extends Handler {
+        String cname;
+        String mname;
+
+        public void close() throws SecurityException {
+        }
+        public void flush() {
+        }
+
+        public void publish(LogRecord record) {
+            cname = record.getSourceClassName();
+            mname = record.getSourceMethodName();
+        }       
+    }
+    
     private static final class LogRecordMatcher implements IArgumentMatcher {
         private final LogRecord record;
 

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/common_build.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/common_build.xml?view=diff&rev=502363&r1=502362&r2=502363
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/common_build.xml (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/common_build.xml Thu Feb  1
13:16:55 2007
@@ -168,7 +168,6 @@
                     <enable package="org.apache.cxf"/>
                 </assertions>
                 <sysproperty key="java.util.logging.config.file" value="@{logging-properties-file}"/>
-                <sysproperty key="log4j.configuration" value="file:///${cxf.etc.dir}/log4j.properties"/>
             </java>
         </sequential>
     </macrodef>

Modified: incubator/cxf/trunk/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/pom.xml?view=diff&rev=502363&r1=502362&r2=502363
==============================================================================
--- incubator/cxf/trunk/pom.xml (original)
+++ incubator/cxf/trunk/pom.xml Thu Feb  1 13:16:55 2007
@@ -451,6 +451,14 @@
                 <version>2.0</version>
                 <exclusions>
                     <exclusion>
+                        <groupId>log4j</groupId>
+                        <artifactId>log4j</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>javax.servlet</groupId>
+                        <artifactId>servlet-api</artifactId>
+                    </exclusion>
+                    <exclusion>
                         <groupId>org.apache.ws.commons.axiom</groupId>
                         <artifactId>axiom-impl</artifactId>
                     </exclusion>
@@ -556,6 +564,16 @@
                 <groupId>org.springframework</groupId>
                 <artifactId>spring-core</artifactId>
                 <version>${spring.version}</version>
+                <exclusions>
+                    <exclusion>
+                        <groupId>log4j</groupId>
+                        <artifactId>log4j</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>javax.servlet</groupId>
+                        <artifactId>servlet-api</artifactId>
+                    </exclusion>
+                </exclusions>
             </dependency>
             <dependency>
                 <groupId>org.springframework</groupId>

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/CXFBusImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/CXFBusImpl.java?view=diff&rev=502363&r1=502362&r2=502363
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/CXFBusImpl.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/CXFBusImpl.java Thu Feb 
1 13:16:55 2007
@@ -23,6 +23,7 @@
 import java.util.Map;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.buslifecycle.BusLifeCycleManager;
 import org.apache.cxf.interceptor.AbstractBasicInterceptorProvider;
 
@@ -108,6 +109,9 @@
         }
         if (null != lifeCycleManager) {
             lifeCycleManager.postShutdown();
+        }
+        if (BusFactory.getDefaultBus(false) == this) { 
+            BusFactory.setDefaultBus(null);
         }
     }
     

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContext.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContext.java?view=diff&rev=502363&r1=502362&r2=502363
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContext.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContext.java
Thu Feb  1 13:16:55 2007
@@ -28,7 +28,6 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
-import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.configuration.Configurer;
 import org.apache.cxf.configuration.spring.JaxbClassPathXmlApplicationContext;
@@ -98,7 +97,7 @@
         if (cpr.exists()) {
             resources.add(cpr);
         } else {
-            LOG.log(Level.INFO, new Message("USER_CFG_FILE_NOT_FOUND_MSG", LOG, cfgFile).toString());
+            LogUtils.log(LOG, Level.INFO, "USER_CFG_FILE_NOT_FOUND_MSG", cfgFile);
         }
         
         if (null != cfgFileURL) {
@@ -106,8 +105,7 @@
             if (ur.exists()) {
                 resources.add(ur);
             } else {
-                LOG.log(Level.INFO, 
-                        new Message("USER_CFG_FILE_URL_NOT_FOUND_MSG", LOG, cfgFileURL).toString());
+                LogUtils.log(LOG, Level.INFO, "USER_CFG_FILE_URL_NOT_FOUND_MSG", cfgFileURL);
             }    
         } 
         
@@ -118,12 +116,10 @@
                 if (ur.exists()) {
                     resources.add(ur);
                 } else {
-                    LOG.log(Level.INFO, 
-                            new Message("USER_CFG_FILE_URL_NOT_FOUND_MSG", LOG, sysCfgFileUrl).toString());
+                    LogUtils.log(LOG, Level.INFO, "USER_CFG_FILE_URL_NOT_FOUND_MSG", sysCfgFileUrl);
                 }            
             } catch (MalformedURLException e) {            
-                LOG.log(Level.WARNING, 
-                        new Message("USER_CFG_FILE_URL_ERROR_MSG", LOG, sysCfgFileUrl).toString());
+                LogUtils.log(LOG, Level.INFO, "USER_CFG_FILE_URL_ERROR_MSG", sysCfgFileUrl);
             }
         }
         

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java?view=diff&rev=502363&r1=502362&r2=502363
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java
Thu Feb  1 13:16:55 2007
@@ -23,7 +23,6 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
-import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.configuration.Configurable;
 import org.apache.cxf.configuration.Configurer;
@@ -62,7 +61,7 @@
                 LogUtils.log(LOG, Level.WARNING, "APP_CONTEXT_CREATION_FAILED_MSG", ex, (Object[])null);
             }
         } else {
-            LOG.log(Level.INFO, new Message("USER_CFG_FILE_NOT_FOUND_MSG", LOG, cfgFile).toString());
+            LogUtils.log(LOG, Level.INFO, "USER_CFG_FILE_NOT_FOUND_MSG", cfgFile);
         }
     }
     
@@ -93,13 +92,16 @@
         
         try {
             super.configureBean(beanInstance);
-            LOG.fine("Successfully performed injection.");
+            if (LOG.isLoggable(Level.FINE)) {
+                LOG.fine("Successfully performed injection.");
+            }
         } catch (NoSuchBeanDefinitionException ex) {
             // users often wonder why the settings in their configuration files seem
             // to have no effect - the most common cause is that they have been using
             // incorrect bean ids
-            LogUtils.log(LOG, Level.INFO, "NO_MATCHING_BEAN_MSG", new Object[] {beanName});
-            LOG.log(Level.INFO, "NO_MATCHING_BEAN_MSG", beanName);
+            if (LOG.isLoggable(Level.INFO)) {
+                LOG.log(Level.INFO, "NO_MATCHING_BEAN_MSG", beanName);
+            }
         }
     }
     
@@ -118,8 +120,8 @@
         }
         
         if (null == beanName) {
-            LogUtils.log(LOG, Level.INFO, "COULD_NOT_DETERMINE_BEAN_NAME_MSG", 
-                         new Object[] {beanInstance.getClass().getName()});
+            LogUtils.log(LOG, Level.INFO, "COULD_NOT_DETERMINE_BEAN_NAME_MSG",
+                         beanInstance.getClass().getName());
         }
       
         return beanName;

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/JaxbClassPathXmlApplicationContext.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/JaxbClassPathXmlApplicationContext.java?view=diff&rev=502363&r1=502362&r2=502363
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/JaxbClassPathXmlApplicationContext.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/JaxbClassPathXmlApplicationContext.java
Thu Feb  1 13:16:55 2007
@@ -27,7 +27,6 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
-import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.configuration.Configurer;
 import org.springframework.beans.BeansException;
@@ -104,7 +103,7 @@
             if (cpr.exists()) {
                 resources.add(cpr);
             } else {
-                LOG.log(Level.INFO, new Message("USER_CFG_FILE_NOT_FOUND_MSG", LOG, cfgFile).toString());
+                LogUtils.log(LOG, Level.INFO, "USER_CFG_FILE_NOT_FOUND_MSG", cfgFile);
             }
         }
         

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java?view=diff&rev=502363&r1=502362&r2=502363
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java Thu
Feb  1 13:16:55 2007
@@ -169,7 +169,9 @@
         if (inMsg != null) {
             if (null != responseContext) {                   
                 responseContext.putAll(inMsg);
-                LOG.info("set responseContext to be" + responseContext);
+                if (LOG.isLoggable(Level.FINE)) {
+                    LOG.fine("set responseContext to be" + responseContext);
+                }
             }
             resList = inMsg.getContent(List.class);
         }
@@ -199,7 +201,9 @@
     private void setContext(Map<String, Object> ctx, Message message) {
         if (ctx != null) {            
             message.putAll(ctx);
-            LOG.info("set requestContext to message be" + ctx);
+            if (LOG.isLoggable(Level.FINE)) {
+                LOG.fine("set requestContext to message be" + ctx);
+            }
         }        
     }
 

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/URIMappingInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/URIMappingInterceptor.java?view=diff&rev=502363&r1=502362&r2=502363
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/URIMappingInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/URIMappingInterceptor.java
Thu Feb  1 13:16:55 2007
@@ -30,6 +30,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.ResourceBundle;
+import java.util.logging.Level;
 import java.util.logging.Logger;
 
 import org.apache.cxf.common.i18n.BundleUtils;
@@ -56,14 +57,20 @@
 
     public void handleMessage(Message message) throws Fault {
         String method = (String)message.get(Message.HTTP_REQUEST_METHOD);
-        LOG.info("Invoking HTTP method " + method);        
+        if (LOG.isLoggable(Level.FINE)) {
+            LOG.fine("Invoking HTTP method " + method);
+        }
         if (!isGET(message)) {
-            LOG.info("URIMappingInterceptor can only handle HTTP GET, not HTTP " + method);
+            if (LOG.isLoggable(Level.FINE)) {
+                LOG.log(Level.FINE, "URIMappingInterceptor can only handle HTTP GET, not
HTTP " + method);
+            }
             return;
         }
 
         String opName = getOperationName(message);
-        LOG.info("URIMappingInterceptor get operation: " + opName);
+        if (LOG.isLoggable(Level.FINE)) {
+            LOG.fine("URIMappingInterceptor get operation: " + opName);
+        }
         BindingOperationInfo op = ServiceModelUtil.getOperation(message.getExchange(), opName);
         
         if (op == null || opName == null || op.getName() == null

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/AbstractConduit.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/AbstractConduit.java?view=diff&rev=502363&r1=502362&r2=502363
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/AbstractConduit.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/AbstractConduit.java
Thu Feb  1 13:16:55 2007
@@ -21,6 +21,7 @@
 
 import java.io.IOException;
 import java.io.OutputStream;
+import java.util.logging.Level;
 import java.util.logging.Logger;
 
 import org.apache.cxf.message.Message;
@@ -79,7 +80,9 @@
      */
     public void setMessageObserver(MessageObserver observer) {
         incomingObserver = observer;
-        getLogger().info("registering incoming observer: " + incomingObserver);
+        if (getLogger().isLoggable(Level.FINE)) {
+            getLogger().fine("registering incoming observer: " + incomingObserver);
+        }
     }
     
     /**

Modified: incubator/cxf/trunk/rt/frontend/jaxws/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/pom.xml?view=diff&rev=502363&r1=502362&r2=502363
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/pom.xml (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/pom.xml Thu Feb  1 13:16:55 2007
@@ -111,6 +111,11 @@
             <artifactId>saaj-api</artifactId>
         </dependency>
         <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-web</artifactId>
             <scope>test</scope>

Modified: incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/JettyHTTPDestination.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/JettyHTTPDestination.java?view=diff&rev=502363&r1=502362&r2=502363
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/JettyHTTPDestination.java
(original)
+++ incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/JettyHTTPDestination.java
Thu Feb  1 13:16:55 2007
@@ -107,7 +107,7 @@
      * Activate receipt of incoming messages.
      */
     protected void activate() {
-        LOG.log(Level.INFO, "Activating receipt of incoming messages");
+        LOG.log(Level.FINE, "Activating receipt of incoming messages");
         try {
             URL url = new URL(getAddressValue(endpointInfo));
             if (contextMatchOnExact()) {
@@ -138,7 +138,7 @@
      * Deactivate receipt of incoming messages.
      */
     protected void deactivate() {
-        LOG.log(Level.INFO, "Deactivating receipt of incoming messages");
+        LOG.log(Level.FINE, "Deactivating receipt of incoming messages");
         engine.removeServant(nurl);   
     }
     
@@ -254,8 +254,8 @@
     protected void serviceRequest(final HttpRequest req, final HttpResponse resp)
         throws IOException {
         try {
-            if (LOG.isLoggable(Level.INFO)) {
-                LOG.info("Service http request on thread: " + Thread.currentThread());
+            if (LOG.isLoggable(Level.FINE)) {
+                LOG.fine("Service http request on thread: " + Thread.currentThread());
             }
 
             MessageImpl inMessage = new MessageImpl();
@@ -281,8 +281,8 @@
             resp.commit();
             req.setHandled(true);
         } finally {
-            if (LOG.isLoggable(Level.INFO)) {
-                LOG.info("Finished servicing http request on thread: " + Thread.currentThread());
+            if (LOG.isLoggable(Level.FINE)) {
+                LOG.fine("Finished servicing http request on thread: " + Thread.currentThread());
             }
         }
     }

Modified: incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf/transport/http/JettyHTTPDestination.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf/transport/http/JettyHTTPDestination.java?view=diff&rev=502363&r1=502362&r2=502363
==============================================================================
--- incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf/transport/http/JettyHTTPDestination.java
(original)
+++ incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf/transport/http/JettyHTTPDestination.java
Thu Feb  1 13:16:55 2007
@@ -282,8 +282,8 @@
         Request baseRequest = (req instanceof Request) 
             ? (Request)req : HttpConnection.getCurrentConnection().getRequest();
         try {
-            if (LOG.isLoggable(Level.INFO)) {
-                LOG.info("Service http request on thread: " + Thread.currentThread());
+            if (LOG.isLoggable(Level.FINE)) {
+                LOG.fine("Service http request on thread: " + Thread.currentThread());
             }
 
             MessageImpl inMessage = new MessageImpl();            
@@ -309,8 +309,8 @@
             resp.flushBuffer();
             baseRequest.setHandled(true);
         } finally {
-            if (LOG.isLoggable(Level.INFO)) {
-                LOG.info("Finished servicing http request on thread: " + Thread.currentThread());
+            if (LOG.isLoggable(Level.FINE)) {
+                LOG.fine("Finished servicing http request on thread: " + Thread.currentThread());
             }
         }
     }

Modified: incubator/cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java?view=diff&rev=502363&r1=502362&r2=502363
==============================================================================
--- incubator/cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java
(original)
+++ incubator/cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java
Thu Feb  1 13:16:55 2007
@@ -68,6 +68,7 @@
         assertEquals("Can't get the right AddressPolicy's ConnectionPassword",
                      "testPassword",
                      conduit.base.getAddressPolicy().getConnectionPassword());
+        bus.shutdown(false);
         BusFactory.setDefaultBus(null);
         
     }



Mime
View raw message