servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject svn commit: r1148931 - in /servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi: framework/ framework/support/ monitoring/ nmr/flow/ util/
Date Wed, 20 Jul 2011 20:38:41 GMT
Author: jbonofre
Date: Wed Jul 20 20:38:34 2011
New Revision: 1148931

URL: http://svn.apache.org/viewvc?rev=1148931&view=rev
Log:
[SM-2048] Use slf4j as default logging system in place of commons-logging.

Modified:
    servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AutoDeploymentService.java
    servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ClientFactory.java
    servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ComponentMBeanImpl.java
    servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ComponentRegistry.java
    servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/Endpoint.java
    servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/EndpointRegistry.java
    servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ManagementSupport.java
    servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceAssemblyRegistry.java
    servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceUnitLifeCycle.java
    servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/support/SUDescriptorProcessor.java
    servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/support/WSDL1Processor.java
    servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/support/WSDL2Processor.java
    servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/monitoring/ComponentStats.java
    servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/monitoring/StatisticsService.java
    servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/AbstractFlow.java
    servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/util/DOMUtil.java
    servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/util/FileVersionUtil.java

Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AutoDeploymentService.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AutoDeploymentService.java?rev=1148931&r1=1148930&r2=1148931&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AutoDeploymentService.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AutoDeploymentService.java Wed Jul 20 20:38:34 2011
@@ -40,8 +40,6 @@ import javax.jbi.management.DeploymentEx
 import javax.management.JMException;
 import javax.management.MBeanAttributeInfo;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.jbi.container.EnvironmentContext;
 import org.apache.servicemix.jbi.container.JBIContainer;
 import org.apache.servicemix.jbi.deployment.Component;
@@ -54,6 +52,8 @@ import org.apache.servicemix.jbi.managem
 import org.apache.servicemix.jbi.management.BaseSystemService;
 import org.apache.servicemix.jbi.util.XmlPersistenceSupport;
 import org.apache.servicemix.util.FileUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Monitors install and deploy directories to auto install/deploy archives
@@ -62,7 +62,7 @@ import org.apache.servicemix.util.FileUt
  */
 public class AutoDeploymentService extends BaseSystemService implements AutoDeploymentServiceMBean {
 
-    private static final Log LOG = LogFactory.getLog(AutoDeploymentService.class);
+    private static final transient Logger LOGGER = LoggerFactory.getLogger(AutoDeploymentService.class);
         
     private static String filePrefix = "file:///";
     private EnvironmentContext environmentContext;
@@ -269,9 +269,7 @@ public class AutoDeploymentService exten
             }
             // See if shared libraries are installed
             entry.dependencies = getSharedLibraryNames(comp);
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Component dependencies: " + entry.dependencies);
-            }
+            LOGGER.debug("Component dependencies: {}", entry.dependencies);
             String missings = null;
             boolean canInstall = true;
             for (String libraryName : entry.dependencies) {
@@ -289,13 +287,13 @@ public class AutoDeploymentService exten
                 checkPendingSAs();
             } else {
                 entry.pending = true;
-                LOG.warn("Shared libraries " + missings + " are not installed yet: the component " + componentName
+                LOGGER.warn("Shared libraries " + missings + " are not installed yet: the component " + componentName
                                 + " installation is suspended and will be resumed once the listed shared libraries are installed");
                 pendingComponents.put(tmpDir, entry);
             }
         } catch (Exception e) {
             String errStr = "Failed to update Component: " + componentName;
-            LOG.error(errStr, e);
+            LOGGER.error(errStr, e);
             throw new DeploymentException(errStr, e);
         }
     }
@@ -313,7 +311,7 @@ public class AutoDeploymentService exten
             checkPendingComponents();
         } catch (Exception e) {
             String errStr = "Failed to update SharedLibrary: " + libraryName;
-            LOG.error(errStr, e);
+            LOGGER.error(errStr, e);
             throw new DeploymentException(errStr, e);
         }
     }
@@ -330,9 +328,7 @@ public class AutoDeploymentService exten
             }
             // see if components are installed
             entry.dependencies = getComponentNames(sa);
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("SA dependencies: " + entry.dependencies);
-            }
+            LOGGER.debug("SA dependencies: {}", entry.dependencies);
             String missings = null;
             boolean canDeploy = true;
             for (String componentName : entry.dependencies) {
@@ -354,13 +350,13 @@ public class AutoDeploymentService exten
                 // TODO: check that the assembly is not already
                 // pending
                 entry.pending = true;
-                LOG.warn("Components " + missings + " are not installed yet: the service assembly " + name
+                LOGGER.warn("Components " + missings + " are not installed yet: the service assembly " + name
                                 + " deployment is suspended and will be resumed once the listed components are installed");
                 pendingSAs.put(tmpDir, entry);
             }
         } catch (Exception e) {
             String errStr = "Failed to update Service Assembly: " + name;
-            LOG.error(errStr, e);
+            LOGGER.error(errStr, e);
             throw new DeploymentException(errStr, e);
         }
     }
@@ -406,7 +402,7 @@ public class AutoDeploymentService exten
     /**
      * Remove an archive location
      * 
-     * @param location
+     * @param entry
      * @throws DeploymentException
      */
     public void removeArchive(ArchiveEntry entry) throws DeploymentException {
@@ -423,20 +419,20 @@ public class AutoDeploymentService exten
             throw failure("deploy", "Error when deploying: " + entry.location, e);
         }
         // Standard processing
-        LOG.info("Attempting to remove archive at: " + entry.location);
+        LOGGER.info("Attempting to remove archive at: {}", entry.location);
         if ("component".equals(entry.type)) {
-            LOG.info("Uninstalling component: " + entry.name);
+            LOGGER.info("Uninstalling component: {}", entry.name);
             // Ensure installer is loaded
             installationService.loadInstaller(entry.name);
             // Uninstall and delete component
             installationService.unloadInstaller(entry.name, true);
         }
         if ("library".equals(entry.type)) {
-            LOG.info("Removing shared library: " + entry.name);
+            LOGGER.info("Removing shared library: {}", entry.name);
             installationService.uninstallSharedLibrary(entry.name);
         }
         if ("assembly".equals(entry.type)) {
-            LOG.info("Undeploying service assembly " + entry.name);
+            LOGGER.info("Undeploying service assembly {}", entry.name);
             try {
                 if (deploymentService.isSaDeployed(entry.name)) {
                     deploymentService.shutDown(entry.name);
@@ -444,7 +440,7 @@ public class AutoDeploymentService exten
                 }
             } catch (Exception e) {
                 String errStr = "Failed to update service assembly: " + entry.name;
-                LOG.error(errStr, e);
+                LOGGER.error(errStr, e);
                 throw new DeploymentException(errStr, e);
             }
         }
@@ -474,7 +470,7 @@ public class AutoDeploymentService exten
                     deploymentService.start(root.getServiceAssembly().getIdentification().getName());
                 } catch (Exception e) {
                     String errStr = "Failed to update Service Assembly: " + tmp.getName();
-                    LOG.error(errStr, e);
+                    LOGGER.error(errStr, e);
                 }
             }
         }
@@ -509,7 +505,7 @@ public class AutoDeploymentService exten
                     installationService.install(tmp, null, root, true);
                 } catch (Exception e) {
                     String errStr = "Failed to update Component: " + tmp.getName();
-                    LOG.error(errStr, e);
+                    LOGGER.error(errStr, e);
                 }
             }
         }
@@ -565,17 +561,13 @@ public class AutoDeploymentService exten
                 file = new File(location);
             }
             if (file.isDirectory()) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Deploying an exploded jar/zip, we will create a temporary jar for it.");
-                }
+                LOGGER.debug("Deploying an exploded jar/zip, we will create a temporary jar for it.");
                 // If we have a directory then we should move it over
                 File newFile = new File(tmpRoot.getAbsolutePath() + "/exploded.jar");
                 newFile.delete();
                 FileUtil.zipDir(file.getAbsolutePath(), newFile.getAbsolutePath());
                 file = newFile;
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Deployment will now work from " + file.getAbsolutePath());
-                }
+                LOGGER.debug("Deployment will now work from {}", file.getAbsolutePath());
             }
             if (!file.exists()) {
                 // assume it's a URL
@@ -593,9 +585,7 @@ public class AutoDeploymentService exten
             if (FileUtil.archiveContainsEntry(file, DescriptorFactory.DESCRIPTOR_FILE)) {
                 tmpDir = FileUtil.createUniqueDirectory(tmpRoot, file.getName());
                 FileUtil.unpackArchive(file, tmpDir);
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Unpacked archive " + location + " to " + tmpDir);
-                }
+                LOGGER.debug("Unpacked archive {} to {}", location, tmpDir);
             }
         } catch (IOException e) {
             throw new DeploymentException(e);
@@ -654,11 +644,11 @@ public class AutoDeploymentService exten
                                 entry.location = file.getName();
                                 entry.lastModified = new Date(file.lastModified());
                                 fileMap.put(file.getName(), entry);
-                                LOG.info("Directory: " + root.getName() + ": Archive changed: processing " + file.getName() + " ...");
+                                LOGGER.info("Directory: {}: Archive changed: processing {}...", root.getName(), file.getName());
                                 updateArchive(file.getAbsolutePath(), entry, true);
-                                LOG.info("Directory: " + root.getName() + ": Finished installation of archive:  " + file.getName());
+                                LOGGER.info("Directory: {}: Finished installation of archive: {}", root.getName(), file.getName());
                             } catch (Exception e) {
-                                LOG.warn("Directory: " + root.getName() + ": Automatic install of " + file + " failed", e);
+                                LOGGER.warn("Directory: " + root.getName() + ": Automatic install of " + file + " failed", e);
                             } finally {
                                 persistState(root, fileMap);
                             }
@@ -672,10 +662,10 @@ public class AutoDeploymentService exten
                 if (!tmpList.contains(location)) {
                     ArchiveEntry entry = fileMap.remove(location);
                     try {
-                        LOG.info("Location " + location + " no longer exists - removing ...");
+                        LOGGER.info("Location {} no longer exists - removing ...", location);
                         removeArchive(entry);
                     } catch (DeploymentException e) {
-                        LOG.error("Failed to removeArchive: " + location, e);
+                        LOGGER.error("Failed to removeArchive: {}", location, e);
                     }
                 }
             }
@@ -688,7 +678,7 @@ public class AutoDeploymentService exten
     private boolean isAvailable(File file) {
         // First check to see if the file is still growing
         if (!FileUtil.isFileFullyAvailable(file)) {
-            LOG.warn("File is still being copied, deployment deferred to next cycle: " + file.getName());
+            LOGGER.warn("File is still being copied, deployment deferred to next cycle: {}", file.getName());
             return false;
         }
 
@@ -698,7 +688,7 @@ public class AutoDeploymentService exten
             zip.size();
             zip.close();
         } catch (IOException e) {
-            LOG.warn("Unable to open deployment file, deployment deferred to next cycle: " + file.getName());
+            LOGGER.warn("Unable to open deployment file, deployment deferred to next cycle: {}", file.getName());
             return false;
         }
 
@@ -720,7 +710,7 @@ public class AutoDeploymentService exten
             File file = new File(environmentContext.getJbiRootDir(), root.getName() + ".xml");
             XmlPersistenceSupport.write(file, map);
         } catch (IOException e) {
-            LOG.error("Failed to persist file state to: " + root, e);
+            LOGGER.error("Failed to persist file state to: {}", root, e);
         }
     }
 
@@ -732,10 +722,10 @@ public class AutoDeploymentService exten
             if (file.exists()) {
                 result = (Map<String, ArchiveEntry>) XmlPersistenceSupport.read(file);
             } else {
-                LOG.debug("State file doesn't exist: " + file.getPath());
+                LOGGER.debug("State file doesn't exist: {}", file.getPath());
             }
         } catch (Exception e) {
-            LOG.error("Failed to read file state from: " + root, e);
+            LOGGER.error("Failed to read file state from: {}", root, e);
         }
         return result;
     }
@@ -746,7 +736,7 @@ public class AutoDeploymentService exten
                 installFileMap = readState(environmentContext.getInstallationDir());
                 removePendingEntries(installFileMap);
             } catch (Exception e) {
-                LOG.error("Failed to read installed state", e);
+                LOGGER.error("Failed to read installed state", e);
             }
         }
         if (isMonitorDeploymentDirectory() && !container.isEmbedded()) {
@@ -754,7 +744,7 @@ public class AutoDeploymentService exten
                 deployFileMap = readState(environmentContext.getDeploymentDir());
                 removePendingEntries(deployFileMap);
             } catch (Exception e) {
-                LOG.error("Failed to read deployed state", e);
+                LOGGER.error("Failed to read deployed state", e);
             }
         }
     }
@@ -828,4 +818,5 @@ public class AutoDeploymentService exten
             this.dependencies = dependencies;
         }
     }
+
 }

Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ClientFactory.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ClientFactory.java?rev=1148931&r1=1148930&r2=1148931&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ClientFactory.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ClientFactory.java Wed Jul 20 20:38:34 2011
@@ -23,19 +23,16 @@ import javax.management.JMException;
 import javax.management.MBeanOperationInfo;
 import javax.naming.NamingException;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.client.DefaultServiceMixClient;
 import org.apache.servicemix.client.ServiceMixClient;
 import org.apache.servicemix.jbi.management.BaseSystemService;
 import org.apache.servicemix.jbi.management.OperationInfoHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
-/**
- * @author <a href="mailto:gnodet [at] apache.org">Guillaume Nodet</a>
- */
 public class ClientFactory extends BaseSystemService implements ClientFactoryMBean, Serializable {
 
-    private static final Log LOG = LogFactory.getLog(ClientFactory.class);
+    private static final transient Logger LOGGER = LoggerFactory.getLogger(ClientFactory.class);
     
     private String jndiName = DEFAULT_JNDI_NAME;
 
@@ -86,10 +83,8 @@ public class ClientFactory extends BaseS
             getContainer().getNamingContext().bind(jndiName, this);
             isFactoryJNDIregistered = true;
         } catch (NamingException e) {
-            LOG.warn("Cound not start ClientFactory: " + e);
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Could not start ClientFactory", e);
-            }
+            LOGGER.warn("Could not start ClientFactory: {}", e.getMessage());
+            LOGGER.debug("Could not start ClientFactory.", e);
             isFactoryJNDIregistered = false;
         }
         super.start();
@@ -107,10 +102,8 @@ public class ClientFactory extends BaseS
                 getContainer().getNamingContext().unbind(jndiName);
             }
         } catch (NamingException e) {
-            LOG.warn("Cound not stop ClientFactory: " + e);
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Could not stop ClientFactory", e);
-            }
+            LOGGER.warn("Could not stop ClientFactory: {}", e.getMessage());
+            LOGGER.debug("Could not stop ClientFactory", e);
         }
     }
 

Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ComponentMBeanImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ComponentMBeanImpl.java?rev=1148931&r1=1148930&r2=1148931&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ComponentMBeanImpl.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ComponentMBeanImpl.java Wed Jul 20 20:38:34 2011
@@ -31,8 +31,6 @@ import javax.management.MBeanAttributeIn
 import javax.management.MBeanOperationInfo;
 import javax.management.ObjectName;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.jbi.container.ActivationSpec;
 import org.apache.servicemix.jbi.container.JBIContainer;
 import org.apache.servicemix.jbi.event.ComponentEvent;
@@ -44,13 +42,15 @@ import org.apache.servicemix.jbi.managem
 import org.apache.servicemix.jbi.messaging.DeliveryChannelImpl;
 import org.apache.servicemix.jbi.util.XmlPersistenceSupport;
 import org.apache.xbean.classloader.DestroyableClassLoader;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Defines basic statistics on the Component
  */
 public class ComponentMBeanImpl extends BaseLifeCycle implements ComponentMBean {
     
-    private static final Log LOG = LogFactory.getLog(ComponentMBeanImpl.class);
+    private static final transient Logger LOGGER = LoggerFactory.getLogger(ComponentMBeanImpl.class);
     
     private boolean exchangeThrottling;
     private long throttlingTimeout = 100;
@@ -121,7 +121,7 @@ public class ComponentMBeanImpl extends 
             return mBeanName;
         }  catch (Exception e) {
             String errorStr = "Failed to register MBeans";
-            LOG.error(errorStr, e);
+            LOGGER.error(errorStr, e);
             throw new JBIException(errorStr, e);
         }
     }
@@ -188,7 +188,7 @@ public class ComponentMBeanImpl extends 
 
     
     public void init() throws JBIException {
-        LOG.info("Initializing component: " + getName());
+        LOGGER.info("Initializing component: {}", getName());
         if (context != null && component != null) {
             DeliveryChannelImpl channel = new DeliveryChannelImpl(this);
             channel.setContext(context);
@@ -211,19 +211,19 @@ public class ComponentMBeanImpl extends 
      * @exception javax.jbi.JBIException if the item fails to start.
      */
     public void start() throws javax.jbi.JBIException {
-        LOG.info("Starting component: " + getName());
+        LOGGER.info("Starting component: {}", getName());
         try {
             doStart();
             persistRunningState();
             getContainer().getRegistry().checkPendingAssemblies();
         } catch (JBIException e) {
-            LOG.error("Could not start component", e);
+            LOGGER.error("Could not start component", e);
             throw e;
         } catch (RuntimeException e) {
-            LOG.error("Could not start component", e);
+            LOGGER.error("Could not start component", e);
             throw e;
         } catch (Error e) {
-            LOG.error("Could not start component", e);
+            LOGGER.error("Could not start component", e);
             throw e;
         }
     }
@@ -234,18 +234,18 @@ public class ComponentMBeanImpl extends 
      * @exception javax.jbi.JBIException if the item fails to stop.
      */
     public void stop() throws javax.jbi.JBIException {
-        LOG.info("Stopping component: " + getName());
+        LOGGER.info("Stopping component: {}", getName());
         try {
             doStop();
             persistRunningState();
         } catch (JBIException e) {
-            LOG.error("Could not stop component", e);
+            LOGGER.error("Could not stop component", e);
             throw e;
         } catch (RuntimeException e) {
-            LOG.error("Could not start component", e);
+            LOGGER.error("Could not start component", e);
             throw e;
         } catch (Error e) {
-            LOG.error("Could not start component", e);
+            LOGGER.error("Could not start component", e);
             throw e;
         }
     }
@@ -256,18 +256,18 @@ public class ComponentMBeanImpl extends 
      * @exception javax.jbi.JBIException if the item fails to shut down.
      */
     public void shutDown() throws javax.jbi.JBIException {
-        LOG.info("Shutting down component: " + getName());
+        LOGGER.info("Shutting down component: {}", getName());
         try {
             doShutDown();
             persistRunningState();
         } catch (JBIException e) {
-            LOG.error("Could not shutDown component", e);
+            LOGGER.error("Could not shutDown component", e);
             throw e;
         } catch (RuntimeException e) {
-            LOG.error("Could not start component", e);
+            LOGGER.error("Could not start component", e);
             throw e;
         } catch (Error e) {
-            LOG.error("Could not start component", e);
+            LOGGER.error("Could not start component", e);
             throw e;
         }
     }
@@ -360,7 +360,7 @@ public class ComponentMBeanImpl extends 
         if (!isPojo()) {
             String name = getName();
             String runningState = getRunningStateFromStore();
-            LOG.info("Setting running state for Component: " + name + " to " + runningState);
+            LOGGER.info("Setting running state for Component: {} to {}", name, runningState);
             if (runningState != null) {
                 if (runningState.equals(LifeCycleMBean.STARTED)) {
                     doStart();
@@ -386,7 +386,7 @@ public class ComponentMBeanImpl extends 
                 props.setProperty("state", currentState);
                 XmlPersistenceSupport.write(stateFile, props);
             } catch (IOException e) {
-                LOG.error("Failed to write current running state for Component: " + name, e);
+                LOGGER.error("Failed to write current running state for Component: {}", name, e);
             }
         }
     }
@@ -401,7 +401,7 @@ public class ComponentMBeanImpl extends 
             Properties props = (Properties) XmlPersistenceSupport.read(stateFile);
             result = props.getProperty("state", result);
         } catch (Exception e) {
-            LOG.error("Failed to read running state for Component: " + name, e);
+            LOGGER.error("Failed to read running state for Component: {}", name, e);
         }
         return result;
     }
@@ -564,7 +564,7 @@ public class ComponentMBeanImpl extends 
                     sa.stop(false, false);
                     registry.addPendingAssembly(sa);
                 } catch (Exception e) {
-                    LOG.error("Error stopping service assembly " + sas[i]);
+                    LOGGER.error("Error stopping service assembly {}", sas[i]);
                 }
             }
         }
@@ -580,7 +580,7 @@ public class ComponentMBeanImpl extends 
                     sa.shutDown(false);
                     registry.addPendingAssembly(sa);
                 } catch (Exception e) {
-                    LOG.error("Error shutting down service assembly " + sas[i]);
+                    LOGGER.error("Error shutting down service assembly {}", sas[i]);
                 }
             }
         }

Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ComponentRegistry.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ComponentRegistry.java?rev=1148931&r1=1148930&r2=1148931&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ComponentRegistry.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ComponentRegistry.java Wed Jul 20 20:38:34 2011
@@ -26,8 +26,8 @@ import java.util.Map;
 import javax.jbi.JBIException;
 import javax.jbi.component.Component;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Registry for Components
@@ -36,7 +36,7 @@ import org.apache.commons.logging.LogFac
  */
 public class ComponentRegistry {
 
-    private final Log log = LogFactory.getLog(ComponentRegistry.class);
+    private static final transient Logger LOGGER = LoggerFactory.getLogger(ComponentRegistry.class);
     private final Map<ComponentNameSpace, ComponentMBeanImpl> idMap = new LinkedHashMap<ComponentNameSpace, ComponentMBeanImpl>();
     private boolean runningStateInitialized;
     private Registry registry;
@@ -82,7 +82,7 @@ public class ComponentRegistry {
                 try {
                     lcc.start();
                 } catch (Exception e) {
-                    log.error("Error during component startup.", e);
+                    LOGGER.error("Error during component startup.", e);
                 }
             }
         }
@@ -98,7 +98,7 @@ public class ComponentRegistry {
             try {
                 lcc.doStop();
             } catch (Exception e) {
-                log.error("Error during component stop.", e);
+                LOGGER.error("Error during component stop.", e);
             }
         }
         runningStateInitialized = false;
@@ -115,7 +115,7 @@ public class ComponentRegistry {
             try {
                 lcc.doShutDown();
             } catch (Exception e) {
-                log.error("Error during component shutdown.", e);
+                LOGGER.error("Error during component shutdown.", e);
             }
         }
     }
@@ -172,7 +172,7 @@ public class ComponentRegistry {
                         lcc.doStart();
                     }
                 } catch (Exception e) {
-                    log.error("Error during set initial running state from start.", e);
+                    LOGGER.error("Error during set initial running state from start.", e);
                 }
             }
         }

Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/Endpoint.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/Endpoint.java?rev=1148931&r1=1148930&r2=1148931&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/Endpoint.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/Endpoint.java Wed Jul 20 20:38:34 2011
@@ -27,8 +27,6 @@ import javax.management.MBeanOperationIn
 import javax.xml.namespace.QName;
 import javax.xml.transform.TransformerException;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.client.ServiceMixClient;
 import org.apache.servicemix.jbi.FaultException;
 import org.apache.servicemix.jbi.jaxp.SourceTransformer;
@@ -42,10 +40,12 @@ import org.apache.servicemix.jbi.service
 import org.apache.servicemix.jbi.servicedesc.LinkedEndpoint;
 import org.apache.servicemix.jbi.util.DOMUtil;
 import org.apache.servicemix.jbi.util.QNameUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class Endpoint implements EndpointMBean, MBeanInfoProvider {
 
-    private static final Log LOG = LogFactory.getLog(Endpoint.class);
+    private static final transient Logger LOGGER = LoggerFactory.getLogger(Endpoint.class);
     
     private AbstractServiceEndpoint endpoint;
     private Registry registry;
@@ -164,7 +164,7 @@ public class Endpoint implements Endpoin
             }
             return null;
         } catch (Exception e) {
-            LOG.debug("Error proces test exchange", e);
+            LOGGER.debug("Error proces test exchange", e);
             throw new RuntimeException(e);
         } finally {
             if (client != null) {

Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/EndpointRegistry.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/EndpointRegistry.java?rev=1148931&r1=1148930&r2=1148931&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/EndpointRegistry.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/EndpointRegistry.java Wed Jul 20 20:38:34 2011
@@ -34,8 +34,6 @@ import javax.management.JMException;
 import javax.management.ObjectName;
 import javax.xml.namespace.QName;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.jbi.event.EndpointEvent;
 import org.apache.servicemix.jbi.event.EndpointListener;
 import org.apache.servicemix.jbi.framework.support.EndpointProcessor;
@@ -43,6 +41,8 @@ import org.apache.servicemix.jbi.service
 import org.apache.servicemix.jbi.servicedesc.ExternalEndpoint;
 import org.apache.servicemix.jbi.servicedesc.InternalEndpoint;
 import org.apache.servicemix.jbi.servicedesc.LinkedEndpoint;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Registry for Components
@@ -51,7 +51,7 @@ import org.apache.servicemix.jbi.service
  */
 public class EndpointRegistry {
     
-    private static final Log LOG = LogFactory.getLog(EndpointRegistry.class);
+    private static final transient Logger LOGGER = LoggerFactory.getLogger(EndpointRegistry.class);
     
     private Registry registry;
     
@@ -84,7 +84,7 @@ public class EndpointRegistry {
         this.endpointProcessors = getEndpointProcessors();
         this.executor.execute(new Runnable() {
             public void run() {
-                LOG.debug("Initializing endpoint event dispatch thread");
+                LOGGER.debug("Initializing endpoint event dispatch thread");
             }
         });
     }
@@ -100,7 +100,7 @@ public class EndpointRegistry {
                 p.init(registry);
                 l.add(p);
             } catch (Throwable e) {
-                LOG.warn("Disabled endpoint processor '" + classes[i] + "': " + e);
+                LOGGER.warn("Disabled endpoint processor '{}", classes[i], e);
             }
         }
         return l;
@@ -169,7 +169,7 @@ public class EndpointRegistry {
             String key = getKey(conn.service, conn.endpoint);
             ServiceEndpoint ep = internalEndpoints.get(key);
             if (ep == null) {
-                LOG.warn("Connection for interface " + interfaceName + " could not find target for service "
+                LOGGER.warn("Connection for interface " + interfaceName + " could not find target for service "
                                 + conn.service + " and endpoint " + conn.endpoint);
                 return new ServiceEndpoint[0];
             } else {
@@ -304,7 +304,7 @@ public class EndpointRegistry {
      * a proxy for external service consumers to access an internal service of the same service name (but a different
      * endpoint name).
      * 
-     * @param provider
+     * @param cns
      * @param externalEndpoint the external endpoint to be registered, must be non-null.
      * @throws JBIException 
      */
@@ -324,7 +324,7 @@ public class EndpointRegistry {
      * can no longer be used as a proxy for external service consumers to access an internal service of the same service
      * name.
      * 
-     * @param provider
+     * @param cns
      * @param externalEndpoint the external endpoint to be deregistered; must be non-null.
      */
     public void unregisterExternalEndpoint(ComponentNameSpace cns, ServiceEndpoint externalEndpoint) {
@@ -496,7 +496,7 @@ public class EndpointRegistry {
             registry.getContainer().getManagementContext().registerMBean(objectName, endpoint, EndpointMBean.class);
             endpointMBeans.put(serviceEndpoint, endpoint);
         } catch (JMException e) {
-            LOG.error("Could not register MBean for endpoint", e);
+            LOGGER.error("Could not register MBean for endpoint", e);
         }
     }
     
@@ -505,7 +505,7 @@ public class EndpointRegistry {
         try {
             registry.getContainer().getManagementContext().unregisterMBean(ep);
         } catch (JBIException e) {
-            LOG.error("Could not unregister MBean for endpoint", e);
+            LOGGER.error("Could not unregister MBean for endpoint", e);
         }
     }
 
@@ -564,4 +564,5 @@ public class EndpointRegistry {
             }
         });
     }
+
 }

Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ManagementSupport.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ManagementSupport.java?rev=1148931&r1=1148930&r2=1148931&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ManagementSupport.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ManagementSupport.java Wed Jul 20 20:38:34 2011
@@ -29,16 +29,17 @@ import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.jbi.util.DOMUtil;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 /**
  * ManagementMessageHelper is a class that ease the building of management messages. 
  */
 public final class ManagementSupport {
     
-    private static final Log LOG = LogFactory.getLog(ManagementSupport.class);
+    private static final transient Logger LOGGER = LoggerFactory.getLogger(ManagementSupport.class);
     
     private ManagementSupport() {
     }
@@ -175,7 +176,7 @@ public final class ManagementSupport {
             }
             return DOMUtil.asIndentedXML(doc);
         } catch (Exception e) {
-            LOG.error("Error", e);
+            LOGGER.error("Error", e);
             return null;
         }
     }
@@ -239,9 +240,7 @@ public final class ManagementSupport {
             Element e = createComponentFailure(task, component, info, null);
             return new DeploymentException(DOMUtil.asXML(e));
         } catch (Exception e) {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Error creating management message", e);
-            }
+            LOGGER.debug("Error creating management message", e);
             return new DeploymentException(info);
         }
     }

Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceAssemblyRegistry.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceAssemblyRegistry.java?rev=1148931&r1=1148930&r2=1148931&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceAssemblyRegistry.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceAssemblyRegistry.java Wed Jul 20 20:38:34 2011
@@ -29,11 +29,11 @@ import javax.jbi.management.DeploymentEx
 import javax.management.JMException;
 import javax.management.ObjectName;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.jbi.container.ServiceAssemblyEnvironment;
 import org.apache.servicemix.jbi.deployment.ServiceAssembly;
 import org.apache.servicemix.jbi.deployment.ServiceUnit;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Registry for Components
@@ -42,7 +42,7 @@ import org.apache.servicemix.jbi.deploym
  */
 public class ServiceAssemblyRegistry {
 
-    private static final Log LOG = LogFactory.getLog(ServiceAssemblyRegistry.class);
+    private static final transient Logger LOGGER = LoggerFactory.getLogger(ServiceAssemblyRegistry.class);
 
     private Map<String, ServiceAssemblyLifeCycle> serviceAssemblies = new ConcurrentHashMap<String, ServiceAssemblyLifeCycle>();
 
@@ -89,7 +89,7 @@ public class ServiceAssemblyRegistry {
                 ObjectName objectName = registry.getContainer().getManagementContext().createObjectName(salc);
                 registry.getContainer().getManagementContext().registerMBean(objectName, salc, ServiceAssemblyMBean.class);
             } catch (JMException e) {
-                LOG.error("Could not register MBean for service assembly", e);
+                LOGGER.error("Could not register MBean for service assembly", e);
             }
             return salc;
         }
@@ -126,7 +126,7 @@ public class ServiceAssemblyRegistry {
                 }
                 registry.getContainer().getManagementContext().unregisterMBean(salc);
             } catch (JBIException e) {
-                LOG.error("Unable to unregister MBean for service assembly", e);
+                LOGGER.error("Unable to unregister MBean for service assembly", e);
             }
             return true;
         } else {
@@ -136,7 +136,7 @@ public class ServiceAssemblyRegistry {
 
     /**
      * Get a named ServiceAssembly
-     * @param name
+     * @param saName
      * @return the ServiceAssembly or null if it doesn't exist
      */
     public ServiceAssemblyLifeCycle getServiceAssembly(String saName) {

Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceUnitLifeCycle.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceUnitLifeCycle.java?rev=1148931&r1=1148930&r2=1148931&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceUnitLifeCycle.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceUnitLifeCycle.java Wed Jul 20 20:38:34 2011
@@ -27,8 +27,6 @@ import javax.management.JMException;
 import javax.management.MBeanAttributeInfo;
 import javax.management.MBeanOperationInfo;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.jbi.deployment.Descriptor;
 import org.apache.servicemix.jbi.deployment.DescriptorFactory;
 import org.apache.servicemix.jbi.deployment.ServiceUnit;
@@ -38,6 +36,8 @@ import org.apache.servicemix.jbi.event.S
 import org.apache.servicemix.jbi.management.AttributeInfoHelper;
 import org.apache.servicemix.jbi.management.MBeanInfoProvider;
 import org.apache.servicemix.jbi.management.OperationInfoHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class ServiceUnitLifeCycle implements ServiceUnitMBean, MBeanInfoProvider {
 
@@ -51,7 +51,7 @@ public class ServiceUnitLifeCycle implem
      */
     private static final String DEPLOYMENT_OPERATION_TIMEOUT_PROPERTY = "org.apache.servicemix.deployment.timeout";
 
-    private static final Log LOG = LogFactory.getLog(ServiceUnitLifeCycle.class);
+    private static final transient Logger LOGGER = LoggerFactory.getLogger(ServiceUnitLifeCycle.class);
 
     private ServiceUnit serviceUnit;
 
@@ -155,7 +155,7 @@ public class ServiceUnitLifeCycle implem
         try {
             return Long.parseLong(propertyValue);
         } catch (NumberFormatException numberFormatException) {
-            LOG.warn("Wrong value for system property" + DEPLOYMENT_OPERATION_TIMEOUT_PROPERTY, numberFormatException);
+            LOGGER.warn("Wrong value for system property {}", DEPLOYMENT_OPERATION_TIMEOUT_PROPERTY, numberFormatException);
             return DEFAULT_DEPLOYMENT_OPERATION_TIMEOUT;
         }
     }
@@ -166,7 +166,7 @@ public class ServiceUnitLifeCycle implem
      * @throws DeploymentException 
      */
     public void init() throws DeploymentException {
-        LOG.info("Initializing service unit: " + getName());
+        LOGGER.info("Initializing service unit: {}", getName());
         checkComponentStarted("init");
         final ServiceUnitManager sum = getServiceUnitManager();
         final File path = getServiceUnitRootPath();
@@ -186,7 +186,7 @@ public class ServiceUnitLifeCycle implem
      * @throws DeploymentException 
      */
     public void start() throws DeploymentException {
-        LOG.info("Starting service unit: " + getName());
+        LOGGER.info("Starting service unit: {}", getName());
         checkComponentStarted("start");
         final ServiceUnitManager sum = getServiceUnitManager();
         new TimedOutExecutor(getComponentClassLoader(), "start " + getName(),
@@ -205,7 +205,7 @@ public class ServiceUnitLifeCycle implem
      * @throws DeploymentException 
      */
     public void stop() throws DeploymentException {
-        LOG.info("Stopping service unit: " + getName());
+        LOGGER.info("Stopping service unit: {}", getName());
         checkComponentStarted("stop");
         final ServiceUnitManager sum = getServiceUnitManager();
         new TimedOutExecutor(getComponentClassLoader(), "stop " + getName(),
@@ -225,7 +225,7 @@ public class ServiceUnitLifeCycle implem
      * @throws DeploymentException 
      */
     public void shutDown() throws DeploymentException {
-        LOG.info("Shutting down service unit: " + getName());
+        LOGGER.info("Shutting down service unit: {}", getName());
         checkComponentStartedOrStopped("shutDown");
         final ServiceUnitManager sum = getServiceUnitManager();
         new TimedOutExecutor(getComponentClassLoader(), "shutdown " + getName(),

Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/support/SUDescriptorProcessor.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/support/SUDescriptorProcessor.java?rev=1148931&r1=1148930&r2=1148931&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/support/SUDescriptorProcessor.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/support/SUDescriptorProcessor.java Wed Jul 20 20:38:34 2011
@@ -16,22 +16,20 @@
  */
 package org.apache.servicemix.jbi.framework.support;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.jbi.deployment.Provides;
 import org.apache.servicemix.jbi.deployment.Services;
 import org.apache.servicemix.jbi.framework.Registry;
 import org.apache.servicemix.jbi.framework.ServiceUnitLifeCycle;
 import org.apache.servicemix.jbi.servicedesc.InternalEndpoint;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Retrieve interface implemented by the given endpoint using the SU jbi descriptors.
- * 
- * @author gnodet
  */
 public class SUDescriptorProcessor implements EndpointProcessor {
 
-    private static final Log LOG = LogFactory.getLog(SUDescriptorProcessor.class);
+    private static final transient Logger LOGGER = LoggerFactory.getLogger(SUDescriptorProcessor.class);
     
     private Registry registry;
     
@@ -55,10 +53,8 @@ public class SUDescriptorProcessor imple
                         if (provides[j].getInterfaceName() != null
                                 && serviceEndpoint.getServiceName().equals(provides[j].getServiceName())
                                 && serviceEndpoint.getEndpointName().equals(provides[j].getEndpointName())) {
-                            if (LOG.isDebugEnabled()) {
-                                LOG.debug("Endpoint " + serviceEndpoint + " is provided by SU " + sus[i].getName());
-                                LOG.debug("Endpoint " + serviceEndpoint + " implements interface " + provides[j].getInterfaceName());
-                            }
+                            LOGGER.debug("Endpoint {} is provided by SU {}", serviceEndpoint, sus[i].getName());
+                            LOGGER.debug("Endpoint {} implements interface {}", serviceEndpoint, provides[j].getInterfaceName());
                             serviceEndpoint.addInterface(provides[j].getInterfaceName());
                         }
                     }

Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/support/WSDL1Processor.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/support/WSDL1Processor.java?rev=1148931&r1=1148930&r2=1148931&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/support/WSDL1Processor.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/support/WSDL1Processor.java Wed Jul 20 20:38:34 2011
@@ -28,21 +28,20 @@ import org.w3c.dom.Document;
 
 import com.ibm.wsdl.Constants;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.jbi.framework.Registry;
 import org.apache.servicemix.jbi.servicedesc.InternalEndpoint;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 /**
  * Retrieve interface implemented by the given endpoint using the WSDL 1 description.
- * 
- * @author gnodet
  */
 public class WSDL1Processor implements EndpointProcessor {
 
     public static final String WSDL1_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/";
     
-    private static final Log LOG = LogFactory.getLog(WSDL1Processor.class);
+    private static final transient Logger LOGGER = LoggerFactory.getLogger(WSDL1Processor.class);
     
     private Registry registry;
     
@@ -59,15 +58,11 @@ public class WSDL1Processor implements E
         try {
             Document document = registry.getEndpointDescriptor(serviceEndpoint);
             if (document == null || document.getDocumentElement() == null) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Endpoint " + serviceEndpoint + " has no service description");
-                }
+                LOGGER.debug("Endpoint {} has no service description", serviceEndpoint);
                 return;
             }
             if (!WSDL1_NAMESPACE.equals(document.getDocumentElement().getNamespaceURI())) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Endpoint " + serviceEndpoint + " has a non WSDL1 service description");
-                }
+                LOGGER.debug("Endpoint {} has a non WSDL1 service description", serviceEndpoint);
                 return;
             }
             WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
@@ -80,42 +75,36 @@ public class WSDL1Processor implements E
                     && definition.getServices().keySet().size() == 0) {
                 PortType portType = (PortType) definition.getPortTypes().values().iterator().next();
                 QName interfaceName = portType.getQName();
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Endpoint " + serviceEndpoint + " implements interface " + interfaceName);
-                }
+                LOGGER.debug("Endpoint {} implements interface {}", serviceEndpoint, interfaceName);
                 serviceEndpoint.addInterface(interfaceName);
             } else {
                 Service service = definition.getService(serviceEndpoint.getServiceName());
                 if (service == null) {
-                    LOG.info("Endpoint " + serviceEndpoint + " has a service description, but no matching service found in "
-                                    + definition.getServices().keySet());
+                    LOGGER.info("Endpoint {} has a service description, but no matching service found in {}",
+                            serviceEndpoint, definition.getServices().keySet());
                     return;
                 }
                 Port port = service.getPort(serviceEndpoint.getEndpointName());
                 if (port == null) {
-                    LOG.info("Endpoint " + serviceEndpoint + " has a service description, but no matching endpoint found in "
-                                    + service.getPorts().keySet());
+                    LOGGER.info("Endpoint {} has a service description, but no matching endpoint found in {}",
+                            serviceEndpoint, service.getPorts().keySet());
                     return;
                 }
                 if (port.getBinding() == null) {
-                    LOG.info("Endpoint " + serviceEndpoint + " has a service description, but no binding found");
+                    LOGGER.info("Endpoint {} has a service description, but no binding found", serviceEndpoint);
                     return;
                 }
                 if (port.getBinding().getPortType() == null) {
-                    LOG.info("Endpoint " + serviceEndpoint + " has a service description, but no port type found");
+                    LOGGER.info("Endpoint {} has a service description, but no port type found", serviceEndpoint);
                     return;
                 }
                 QName interfaceName = port.getBinding().getPortType().getQName();
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Endpoint " + serviceEndpoint + " implements interface " + interfaceName);
-                }
+                LOGGER.debug("Endpoint {} implements interface {}", serviceEndpoint, interfaceName);
                 serviceEndpoint.addInterface(interfaceName);
             }
         } catch (Exception e) {
-            LOG.warn("Error retrieving interfaces from service description: " + e.getMessage());
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Error retrieving interfaces from service description", e);
-            }
+            LOGGER.warn("Error retrieving interfaces from service description: {}", e.getMessage());
+            LOGGER.debug("Error retrieving interfaces from service description", e);
         }
     }
 

Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/support/WSDL2Processor.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/support/WSDL2Processor.java?rev=1148931&r1=1148930&r2=1148931&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/support/WSDL2Processor.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/support/WSDL2Processor.java Wed Jul 20 20:38:34 2011
@@ -20,10 +20,9 @@ import javax.xml.namespace.QName;
 
 import org.w3c.dom.Document;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.jbi.framework.Registry;
 import org.apache.servicemix.jbi.servicedesc.InternalEndpoint;
+
 import org.apache.woden.WSDLReader;
 import org.apache.woden.internal.DOMWSDLReader;
 import org.apache.woden.internal.DOMWSDLSource;
@@ -34,16 +33,18 @@ import org.apache.woden.wsdl20.Interface
 import org.apache.woden.wsdl20.Service;
 import org.apache.woden.wsdl20.xml.DescriptionElement;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
 /**
  * Retrieve interface implemented by the given endpoint using the WSDL 2 description.
- * 
- * @author gnodet
  */
 public class WSDL2Processor implements EndpointProcessor {
 
     public static final String WSDL2_NAMESPACE = "http://www.w3.org/2006/01/wsdl";
 
-    private static final Log LOG = LogFactory.getLog(WSDL2Processor.class);
+    private static final transient Logger LOGGER = LoggerFactory.getLogger(WSDL2Processor.class);
     
     private Registry registry;
     
@@ -60,15 +61,11 @@ public class WSDL2Processor implements E
         try {
             Document document = registry.getEndpointDescriptor(serviceEndpoint);
             if (document == null || document.getDocumentElement() == null) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Endpoint " + serviceEndpoint + " has no service description");
-                }
+                LOGGER.debug("Endpoint {} has no service description", serviceEndpoint);
                 return;
             }
             if (!WSDL2_NAMESPACE.equals(document.getDocumentElement().getNamespaceURI())) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Endpoint " + serviceEndpoint + " has a non WSDL2 service description");
-                }
+                LOGGER.debug("Endpoint {} has a non WSDL2 service description", serviceEndpoint);
                 return;
             }
             WSDLReader reader = new DOMWSDLReader();
@@ -82,42 +79,36 @@ public class WSDL2Processor implements E
             if (desc.getInterfaces().length == 1 && desc.getServices().length == 0) {
                 Interface itf = desc.getInterfaces()[0];
                 QName interfaceName = itf.getName();
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Endpoint " + serviceEndpoint + " implements interface " + interfaceName);
-                }
+                LOGGER.debug("Endpoint {} implements interface {}", serviceEndpoint, interfaceName);
                 serviceEndpoint.addInterface(interfaceName);
             } else {
                 Service service = desc.getService(serviceEndpoint.getServiceName());
                 if (service == null) {
-                    LOG.info("Endpoint " + serviceEndpoint + " has a service description, but no matching service found in "
-                                    + desc.getServices());
+                    LOGGER.info("Endpoint {} has a service description, but no matching service found in {}",
+                                    serviceEndpoint, desc.getServices());
                     return;
                 }
                 Endpoint endpoint = service.getEndpoint(new NCName(serviceEndpoint.getEndpointName()));
                 if (endpoint == null) {
-                    LOG.info("Endpoint " + serviceEndpoint + " has a service description, but no matching endpoint found in "
-                                    + service.getEndpoints());
+                    LOGGER.info("Endpoint {} has a service description, but no matching endpoint found in {}",
+                                    serviceEndpoint, service.getEndpoints());
                     return;
                 }
                 if (endpoint.getBinding() == null) {
-                    LOG.info("Endpoint " + serviceEndpoint + " has a service description, but no binding found");
+                    LOGGER.info("Endpoint {} has a service description, but no binding found", serviceEndpoint);
                     return;
                 }
                 if (endpoint.getBinding().getInterface() == null) {
-                    LOG.info("Endpoint " + serviceEndpoint + " has a service description, but no port type found");
+                    LOGGER.info("Endpoint {} has a service description, but no port type found", serviceEndpoint);
                     return;
                 }
                 QName interfaceName = endpoint.getBinding().getInterface().getName();
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Endpoint " + serviceEndpoint + " implements interface " + interfaceName);
-                }
+                LOGGER.debug("Endpoint {} implements interface {}", serviceEndpoint, interfaceName);
                 serviceEndpoint.addInterface(interfaceName);
             }
         } catch (Exception e) {
-            LOG.warn("Error retrieving interfaces from service description: " + e.getMessage());
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Error retrieving interfaces from service description", e);
-            }
+            LOGGER.warn("Error retrieving interfaces from service description: {}", e.getMessage());
+            LOGGER.debug("Error retrieving interfaces from service description", e);
         }
     }
 }

Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/monitoring/ComponentStats.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/monitoring/ComponentStats.java?rev=1148931&r1=1148930&r2=1148931&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/monitoring/ComponentStats.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/monitoring/ComponentStats.java Wed Jul 20 20:38:34 2011
@@ -25,12 +25,12 @@ import javax.management.JMException;
 import javax.management.MBeanAttributeInfo;
 import javax.management.MBeanOperationInfo;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.jbi.framework.ComponentMBeanImpl;
 import org.apache.servicemix.jbi.management.AttributeInfoHelper;
 import org.apache.servicemix.jbi.management.BaseLifeCycle;
 import org.apache.servicemix.jbi.management.OperationInfoHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Defines basic statistics on the Component
@@ -39,7 +39,7 @@ public class ComponentStats extends Base
 
     public static final String STATS_FILE = "stats.csv";
     
-    private static final Log LOG = LogFactory.getLog(ComponentStats.class);
+    private static final transient Logger LOGGER = LoggerFactory.getLogger(ComponentStats.class);
     
     private ComponentMBeanImpl component;
     private MessagingStats stats;
@@ -49,7 +49,7 @@ public class ComponentStats extends Base
     /**
      * Constructor
      * 
-     * @param lcc
+     * @param component
      */
     public ComponentStats(ComponentMBeanImpl component) {
         this.component = component;
@@ -81,7 +81,7 @@ public class ComponentStats extends Base
                 double outboundRate = stats.getOutboundExchangeRate().getAveragePerSecond();
                 statsWriter.println(inbound + "," + inboundRate + "," + outbound + "," + outboundRate);
             } catch (IOException e) {
-                LOG.warn("Failed to dump stats", e);
+                LOGGER.warn("Failed to dump stats", e);
             }
         }
     }

Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/monitoring/StatisticsService.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/monitoring/StatisticsService.java?rev=1148931&r1=1148930&r2=1148931&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/monitoring/StatisticsService.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/monitoring/StatisticsService.java Wed Jul 20 20:38:34 2011
@@ -30,8 +30,6 @@ import javax.management.JMException;
 import javax.management.MBeanAttributeInfo;
 import javax.management.MBeanOperationInfo;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.JbiConstants;
 import org.apache.servicemix.jbi.container.JBIContainer;
 import org.apache.servicemix.jbi.event.ComponentAdapter;
@@ -51,15 +49,15 @@ import org.apache.servicemix.jbi.managem
 import org.apache.servicemix.jbi.messaging.MessageExchangeImpl;
 import org.apache.servicemix.jbi.servicedesc.AbstractServiceEndpoint;
 import org.apache.servicemix.jbi.servicedesc.EndpointSupport;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
- * 
- * @author gnodet
  * @org.apache.xbean.XBean element="statistics"
  */
 public class StatisticsService extends BaseSystemService implements StatisticsServiceMBean {
 
-    private static final Log LOG = LogFactory.getLog(StatisticsService.class);
+    private static final transient Logger LOGGER = LoggerFactory.getLogger(StatisticsService.class);
     
     private ConcurrentHashMap<String, ComponentStats> componentStats = new ConcurrentHashMap<String, ComponentStats>();
     private ConcurrentHashMap<String, EndpointStats> endpointStats = new ConcurrentHashMap<String, EndpointStats>();
@@ -93,9 +91,6 @@ public class StatisticsService extends B
         return dumpStats;
     }
 
-    /**
-     * @param dumpStats the dumpStats to set
-     */
     public void setDumpStats(boolean value) {
         if (dumpStats && !value) {
             if (timerTask != null) {
@@ -319,10 +314,8 @@ public class StatisticsService extends B
                     stats, 
                     ComponentStatsMBean.class);
         } catch (Exception e) {
-            LOG.info("Unable to register component statistics MBean: " + e.getMessage());
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Unable to register component statistics MBean", e);
-            }
+            LOGGER.info("Unable to register component statistics MBean: {}", e.getMessage());
+            LOGGER.debug("Unable to register component statistics MBean", e);
         }
     }
 
@@ -340,10 +333,8 @@ public class StatisticsService extends B
         try {
             context.unregisterMBean(context.createObjectName(context.createObjectNameProps(stats, true)));
         } catch (Exception e) {
-            LOG.info("Unable to unregister component statistics MBean: " + e);
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Unable to unregister component statistics MBean", e);
-            }
+            LOGGER.info("Unable to unregister component statistics MBean: {}", e);
+            LOGGER.debug("Unable to unregister component statistics MBean", e);
         }
     }
     
@@ -362,10 +353,8 @@ public class StatisticsService extends B
                                   stats, 
                                   EndpointStatsMBean.class);
         } catch (Exception e) {
-            LOG.info("Unable to register endpoint statistics MBean: " + e.getMessage());
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Unable to register endpoint statistics MBean", e);
-            }
+            LOGGER.info("Unable to register endpoint statistics MBean: {}", e.getMessage());
+            LOGGER.debug("Unable to register endpoint statistics MBean", e);
         }
     }
 
@@ -380,10 +369,8 @@ public class StatisticsService extends B
         try {
             context.unregisterMBean(context.createObjectName(context.createObjectNameProps(stats, true)));
         } catch (Exception e) {
-            LOG.info("Unable to unregister endpoint statistics MBean: " + e.getMessage());
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Unable to unregister endpoint statistics MBean", e);
-            }
+            LOGGER.info("Unable to unregister endpoint statistics MBean: {}", e.getMessage());
+            LOGGER.debug("Unable to unregister endpoint statistics MBean", e);
         }
     }
     
@@ -404,4 +391,5 @@ public class StatisticsService extends B
     protected ConcurrentHashMap<String, ComponentStats> getComponentStats() {
         return componentStats;
     }
+
 }

Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/AbstractFlow.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/AbstractFlow.java?rev=1148931&r1=1148930&r2=1148931&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/AbstractFlow.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/AbstractFlow.java Wed Jul 20 20:38:34 2011
@@ -51,7 +51,7 @@ import org.slf4j.LoggerFactory;
  */
 public abstract class AbstractFlow extends BaseLifeCycle implements Flow {
 
-    protected final static transient Logger LOGGER = LoggerFactory.getLogger(AbstractFlow.class);
+    protected static final transient Logger LOGGER = LoggerFactory.getLogger(AbstractFlow.class);
 
     protected Broker broker;
     protected ExecutorFactory executorFactory;

Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/util/DOMUtil.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/util/DOMUtil.java?rev=1148931&r1=1148930&r2=1148931&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/util/DOMUtil.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/util/DOMUtil.java Wed Jul 20 20:38:34 2011
@@ -31,8 +31,6 @@ import javax.xml.transform.TransformerFa
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.w3c.dom.Attr;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -40,6 +38,9 @@ import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 /**
  * A collection of W3C DOM helper methods
  *

Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/util/FileVersionUtil.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/util/FileVersionUtil.java?rev=1148931&r1=1148930&r2=1148931&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/util/FileVersionUtil.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/util/FileVersionUtil.java Wed Jul 20 20:38:34 2011
@@ -16,12 +16,12 @@
  */
 package org.apache.servicemix.jbi.util;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 import java.io.File;
 import java.io.IOException;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 /**
  * Supports a simple versioning scheme using the file system
  * 



Mime
View raw message