You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by jb...@apache.org on 2011/02/08 17:32:56 UTC

svn commit: r1068468 [1/2] - in /servicemix/smx4/nmr/trunk: ./ document/ examples/interceptors/endpoint/ examples/interceptors/endpoint/src/main/java/org/apache/servicemix/nmr/examples/interceptors/endpoint/ examples/interceptors/exchange/ examples/int...

Author: jbonofre
Date: Tue Feb  8 16:32:54 2011
New Revision: 1068468

URL: http://svn.apache.org/viewvc?rev=1068468&view=rev
Log:
[SMX4NMR-250] Use SLF4J logger in place of commons-logging.

Modified:
    servicemix/smx4/nmr/trunk/document/pom.xml
    servicemix/smx4/nmr/trunk/examples/interceptors/endpoint/pom.xml
    servicemix/smx4/nmr/trunk/examples/interceptors/endpoint/src/main/java/org/apache/servicemix/nmr/examples/interceptors/endpoint/CustomEndpointListener.java
    servicemix/smx4/nmr/trunk/examples/interceptors/exchange/pom.xml
    servicemix/smx4/nmr/trunk/examples/interceptors/exchange/src/main/java/org/apache/servicemix/nmr/examples/interceptors/exchange/CustomExchangeListener.java
    servicemix/smx4/nmr/trunk/examples/nmr/client/pom.xml
    servicemix/smx4/nmr/trunk/examples/nmr/client/src/main/java/org/apache/servicemix/nmr/examples/nmr/client/Client.java
    servicemix/smx4/nmr/trunk/examples/nmr/endpoint/pom.xml
    servicemix/smx4/nmr/trunk/examples/nmr/endpoint/src/main/java/org/apache/servicemix/nmr/examples/nmr/endpoint/EchoEndpoint.java
    servicemix/smx4/nmr/trunk/jbi/cluster/engine/pom.xml
    servicemix/smx4/nmr/trunk/jbi/cluster/engine/src/main/java/org/apache/servicemix/jbi/cluster/engine/ClusterEngine.java
    servicemix/smx4/nmr/trunk/jbi/cluster/engine/src/test/java/org/apache/servicemix/jbi/cluster/engine/AbstractClusterEndpointTest.java
    servicemix/smx4/nmr/trunk/jbi/cluster/engine/src/test/java/org/apache/servicemix/jbi/cluster/engine/AutoFailTestSupport.java
    servicemix/smx4/nmr/trunk/jbi/cluster/requestor/pom.xml
    servicemix/smx4/nmr/trunk/jbi/deployer/pom.xml
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/artifacts/AbstractLifecycleJbiArtifact.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/artifacts/ComponentImpl.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/artifacts/ServiceAssemblyImpl.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/artifacts/ServiceUnitImpl.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/artifacts/SharedLibraryImpl.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/Connection.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/JBIDeploymentListener.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/AbstractInstaller.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/ComponentInstaller.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/Deployer.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/DeploymentService.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/InstallationService.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/ServiceAssemblyInstaller.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/SharedLibraryInstaller.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/utils/ManagementSupport.java
    servicemix/smx4/nmr/trunk/jbi/osgi/pom.xml
    servicemix/smx4/nmr/trunk/jbi/osgi/src/main/java/org/apache/servicemix/jbi/osgi/RegistryWrapper.java
    servicemix/smx4/nmr/trunk/jbi/runtime/pom.xml
    servicemix/smx4/nmr/trunk/jbi/runtime/src/main/java/org/apache/servicemix/jbi/runtime/impl/AbstractComponentContext.java
    servicemix/smx4/nmr/trunk/jbi/runtime/src/main/java/org/apache/servicemix/jbi/runtime/impl/ComponentContextImpl.java
    servicemix/smx4/nmr/trunk/jbi/runtime/src/main/java/org/apache/servicemix/jbi/runtime/impl/ComponentRegistryImpl.java
    servicemix/smx4/nmr/trunk/jbi/runtime/src/main/java/org/apache/servicemix/jbi/runtime/impl/ServiceEndpointImpl.java
    servicemix/smx4/nmr/trunk/jbi/runtime/src/main/java/org/apache/servicemix/jbi/runtime/impl/utils/DOMUtil.java
    servicemix/smx4/nmr/trunk/nmr/audit/pom.xml
    servicemix/smx4/nmr/trunk/nmr/audit/src/main/java/org/apache/servicemix/nmr/audit/AbstractAuditor.java
    servicemix/smx4/nmr/trunk/nmr/audit/src/main/java/org/apache/servicemix/nmr/audit/file/FileAuditor.java
    servicemix/smx4/nmr/trunk/nmr/audit/src/main/java/org/apache/servicemix/nmr/audit/jdbc/JdbcAuditor.java
    servicemix/smx4/nmr/trunk/nmr/audit/src/main/java/org/apache/servicemix/nmr/audit/lucene/LuceneAuditor.java
    servicemix/smx4/nmr/trunk/nmr/core/pom.xml
    servicemix/smx4/nmr/trunk/nmr/core/src/main/java/org/apache/servicemix/nmr/core/ChannelImpl.java
    servicemix/smx4/nmr/trunk/nmr/core/src/main/java/org/apache/servicemix/nmr/core/ServiceRegistryImpl.java
    servicemix/smx4/nmr/trunk/nmr/core/src/main/java/org/apache/servicemix/nmr/core/security/JaasAuthenticationService.java
    servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/util/ExchangeUtilsTest.java
    servicemix/smx4/nmr/trunk/nmr/management/pom.xml
    servicemix/smx4/nmr/trunk/nmr/management/src/main/java/org/apache/servicemix/nmr/management/DefaultNamingStrategy.java
    servicemix/smx4/nmr/trunk/nmr/management/src/main/java/org/apache/servicemix/nmr/management/ManagementAgent.java
    servicemix/smx4/nmr/trunk/nmr/management/src/main/java/org/apache/servicemix/nmr/management/ManagementEndpointRegistry.java
    servicemix/smx4/nmr/trunk/nmr/management/src/test/java/org/apache/servicemix/nmr/management/stats/CountStatisticTest.java
    servicemix/smx4/nmr/trunk/nmr/management/src/test/java/org/apache/servicemix/nmr/management/stats/TimeStatisticTest.java
    servicemix/smx4/nmr/trunk/nmr/osgi/pom.xml
    servicemix/smx4/nmr/trunk/nmr/spring/pom.xml
    servicemix/smx4/nmr/trunk/pom.xml
    servicemix/smx4/nmr/trunk/testing/support/src/main/java/org/apache/servicemix/platform/testing/support/Counter.java
    servicemix/smx4/nmr/trunk/testing/support/src/main/java/org/apache/servicemix/platform/testing/support/SmxPlatform.java

Modified: servicemix/smx4/nmr/trunk/document/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/document/pom.xml?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/document/pom.xml (original)
+++ servicemix/smx4/nmr/trunk/document/pom.xml Tue Feb  8 16:32:54 2011
@@ -36,10 +36,6 @@
 
     <dependencies>
         <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-        </dependency>
-        <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-beans</artifactId>
         </dependency>

Modified: servicemix/smx4/nmr/trunk/examples/interceptors/endpoint/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/examples/interceptors/endpoint/pom.xml?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/examples/interceptors/endpoint/pom.xml (original)
+++ servicemix/smx4/nmr/trunk/examples/interceptors/endpoint/pom.xml Tue Feb  8 16:32:54 2011
@@ -36,8 +36,8 @@
 
     <dependencies>
         <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
             <scope>provided</scope>
         </dependency>
         <dependency>
@@ -56,7 +56,7 @@
                         <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                         <Bundle-Description>${project.description}</Bundle-Description>
                         <Import-Package>
-                            org.apache.commons.logging,
+                            org.slf4j,
                             org.apache.servicemix.nmr.api,
                             org.apache.servicemix.nmr.api.event,
                             org.apache.servicemix.nmr.api.internal

Modified: servicemix/smx4/nmr/trunk/examples/interceptors/endpoint/src/main/java/org/apache/servicemix/nmr/examples/interceptors/endpoint/CustomEndpointListener.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/examples/interceptors/endpoint/src/main/java/org/apache/servicemix/nmr/examples/interceptors/endpoint/CustomEndpointListener.java?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/examples/interceptors/endpoint/src/main/java/org/apache/servicemix/nmr/examples/interceptors/endpoint/CustomEndpointListener.java (original)
+++ servicemix/smx4/nmr/trunk/examples/interceptors/endpoint/src/main/java/org/apache/servicemix/nmr/examples/interceptors/endpoint/CustomEndpointListener.java Tue Feb  8 16:32:54 2011
@@ -16,12 +16,10 @@
  */
 package org.apache.servicemix.nmr.examples.interceptors.endpoint;
 
-import org.apache.servicemix.nmr.api.Endpoint;
 import org.apache.servicemix.nmr.api.event.EndpointListener;
 import org.apache.servicemix.nmr.api.internal.InternalEndpoint;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * This listener will be called each time it receives events
@@ -30,7 +28,7 @@ import org.apache.commons.logging.LogFac
  */
 public class CustomEndpointListener implements EndpointListener {
 
-    private static final transient Log LOG = LogFactory.getLog(CustomEndpointListener.class);
+    private final Logger logger = LoggerFactory.getLogger(CustomEndpointListener.class);
 
     /**
      * An endpoint has been registered
@@ -38,8 +36,7 @@ public class CustomEndpointListener impl
      * @param endpoint the registered endpoint
      */
     public void endpointRegistered(InternalEndpoint endpoint) {
-        LOG.info("Endpoint Registered: ID: " + endpoint.getId() +
-                 " Meta-Data: " + endpoint.getMetaData().toString());
+        logger.info("Endpoint Registered: ID: {} Meta-Data: {}", endpoint.getId(), endpoint.getMetaData().toString());
     }
 
     /**
@@ -48,8 +45,7 @@ public class CustomEndpointListener impl
      * @param endpoint the unregistered endpoint
      */
     public void endpointUnregistered(InternalEndpoint endpoint) {
-        LOG.info("Endpoint Unregistered: ID: " + endpoint.getId() +
-                 " Meta-Data: " + endpoint.getMetaData().toString());
+        logger.info("Endpoint Unregistered: ID: {} Meta-Data: {}", endpoint.getId(), endpoint.getMetaData().toString());
     }
 
 }

Modified: servicemix/smx4/nmr/trunk/examples/interceptors/exchange/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/examples/interceptors/exchange/pom.xml?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/examples/interceptors/exchange/pom.xml (original)
+++ servicemix/smx4/nmr/trunk/examples/interceptors/exchange/pom.xml Tue Feb  8 16:32:54 2011
@@ -36,8 +36,8 @@
 
     <dependencies>
         <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
             <scope>provided</scope>
         </dependency>
         <dependency>
@@ -56,7 +56,7 @@
                         <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                         <Bundle-Description>${project.description}</Bundle-Description>
                         <Import-Package>
-                            org.apache.commons.logging,
+                            org.slf4j,
                             org.apache.servicemix.nmr.api,
                             org.apache.servicemix.nmr.api.event,
                             org.apache.servicemix.nmr.api.internal

Modified: servicemix/smx4/nmr/trunk/examples/interceptors/exchange/src/main/java/org/apache/servicemix/nmr/examples/interceptors/exchange/CustomExchangeListener.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/examples/interceptors/exchange/src/main/java/org/apache/servicemix/nmr/examples/interceptors/exchange/CustomExchangeListener.java?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/examples/interceptors/exchange/src/main/java/org/apache/servicemix/nmr/examples/interceptors/exchange/CustomExchangeListener.java (original)
+++ servicemix/smx4/nmr/trunk/examples/interceptors/exchange/src/main/java/org/apache/servicemix/nmr/examples/interceptors/exchange/CustomExchangeListener.java Tue Feb  8 16:32:54 2011
@@ -20,11 +20,9 @@ import org.apache.servicemix.nmr.api.Exc
 import org.apache.servicemix.nmr.api.Role;
 import org.apache.servicemix.nmr.api.Status;
 import org.apache.servicemix.nmr.api.event.ExchangeListener;
-import org.apache.servicemix.nmr.api.internal.InternalEndpoint;
 import org.apache.servicemix.nmr.api.internal.InternalExchange;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * This listener will be called each time an exchange is sent
@@ -32,7 +30,7 @@ import org.apache.commons.logging.LogFac
  */
 public class CustomExchangeListener implements ExchangeListener {
 
-    private static final transient Log LOG = LogFactory.getLog(CustomExchangeListener.class);
+    private final Logger logger = LoggerFactory.getLogger(CustomExchangeListener.class);
 
     /**
      * Method called each time an exchange is sent
@@ -41,7 +39,7 @@ public class CustomExchangeListener impl
      */
     public void exchangeSent(Exchange exchange) {
          try {
-             LOG.info("Sending exchange: " + exchange);
+             logger.info("Sending exchange: {}", exchange);
              // Intercept exchanges
              if (exchange instanceof InternalExchange &&
                  exchange.getStatus() == Status.Active &&
@@ -49,10 +47,10 @@ public class CustomExchangeListener impl
                  exchange.getOut(false) == null &&
                  exchange.getFault(false) == null) {
                  String id = ((InternalExchange) exchange).getSource().getId();
-                 LOG.info("Source endpoint: " + id);
+                 logger.info("Source endpoint: {}", id);
              }
          } catch (Throwable t) {
-             LOG.warn("Caught exception while processing exchange: " + t, t);
+             logger.warn("Caught exception while processing exchange: {}", t, t);
          }
     }
 
@@ -63,17 +61,17 @@ public class CustomExchangeListener impl
      */
     public void exchangeDelivered(Exchange exchange) {
         try {
-            LOG.info("Receiving exchange: " + exchange);
+            logger.info("Receiving exchange: {}", exchange);
             if (exchange.getStatus() == Status.Active &&
                 exchange.getRole() == Role.Provider &&
                 exchange.getOut(false) == null &&
                 exchange.getFault(false) == null &&
                 exchange instanceof InternalExchange) {
                 String id = ((InternalExchange) exchange).getDestination().getId();
-                LOG.info("Dest endpoint: " + id);
+                logger.info("Dest endpoint: {}", id);
             }
         } catch (Throwable t) {
-            LOG.warn("Caught exception while processing exchange: " + t, t);
+            logger.warn("Caught exception while processing exchange: {}", t, t);
         }
     }
 
@@ -86,7 +84,7 @@ public class CustomExchangeListener impl
      * @param exchange the exchange that failed
      */
     public void exchangeFailed(Exchange exchange) {
-        LOG.info("Exchange Failed: " + exchange);
+        logger.info("Exchange Failed: {}", exchange);
     }
 
 }

Modified: servicemix/smx4/nmr/trunk/examples/nmr/client/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/examples/nmr/client/pom.xml?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/examples/nmr/client/pom.xml (original)
+++ servicemix/smx4/nmr/trunk/examples/nmr/client/pom.xml Tue Feb  8 16:32:54 2011
@@ -40,8 +40,8 @@
             <artifactId>org.apache.servicemix.nmr.api</artifactId>
         </dependency>
         <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
             <scope>provided</scope>
         </dependency>
         <dependency>
@@ -65,11 +65,12 @@
                     <instructions>
                         <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                         <Bundle-Description>${project.description}</Bundle-Description>
-                        <Import-Package>org.apache.commons.logging, 
-                                        org.apache.servicemix.nmr.api, 
-                                        org.apache.servicemix.nmr.api.service,
-                                        org.osgi.framework,
-                                        org.springframework.beans.factory;version="${spring.import.range}"
+                        <Import-Package>
+                            org.slf4j,
+                            org.apache.servicemix.nmr.api,
+                            org.apache.servicemix.nmr.api.service,
+                            org.osgi.framework,
+                            org.springframework.beans.factory;version="${spring.import.range}"
                         </Import-Package>
                         <Private-Package>org.apache.servicemix.nmr.examples.nmr.client</Private-Package>
                     </instructions>

Modified: servicemix/smx4/nmr/trunk/examples/nmr/client/src/main/java/org/apache/servicemix/nmr/examples/nmr/client/Client.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/examples/nmr/client/src/main/java/org/apache/servicemix/nmr/examples/nmr/client/Client.java?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/examples/nmr/client/src/main/java/org/apache/servicemix/nmr/examples/nmr/client/Client.java (original)
+++ servicemix/smx4/nmr/trunk/examples/nmr/client/src/main/java/org/apache/servicemix/nmr/examples/nmr/client/Client.java Tue Feb  8 16:32:54 2011
@@ -16,8 +16,6 @@
  */
 package org.apache.servicemix.nmr.examples.nmr.client;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.nmr.api.Channel;
 import org.apache.servicemix.nmr.api.Endpoint;
 import org.apache.servicemix.nmr.api.Exchange;
@@ -26,12 +24,15 @@ import org.apache.servicemix.nmr.api.Pat
 import org.apache.servicemix.nmr.api.Status;
 import org.apache.servicemix.nmr.api.Reference;
 import org.apache.servicemix.nmr.api.service.ServiceHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.DisposableBean;
 import org.springframework.beans.factory.InitializingBean;
 
 public class Client implements InitializingBean, DisposableBean, Runnable {
 
-    private static final transient Log LOG = LogFactory.getLog(Client.class);
+    private final Logger logger = LoggerFactory.getLogger(Client.class);
+
     private NMR nmr;
 
     private Thread sendRequestThread;
@@ -72,13 +73,13 @@ public class Client implements Initializ
                     e.setTarget(ref);
                     e.getIn().setBody("Hello");
                     client.sendSync(e);
-                    LOG.info("Response from Endpoint " + e.getOut().getBody());
+                    logger.info("Response from Endpoint {}", e.getOut().getBody());
                     // Send back the Done status
                     e.setStatus(Status.Done);
                     client.send(e);
                 } catch (Exception e) {
                     e.printStackTrace();
-                    LOG.error(e.getMessage());
+                    logger.error(e.getMessage());
                 }
                 // Sleep a bit
                 try {

Modified: servicemix/smx4/nmr/trunk/examples/nmr/endpoint/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/examples/nmr/endpoint/pom.xml?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/examples/nmr/endpoint/pom.xml (original)
+++ servicemix/smx4/nmr/trunk/examples/nmr/endpoint/pom.xml Tue Feb  8 16:32:54 2011
@@ -40,8 +40,8 @@
             <artifactId>org.apache.servicemix.nmr.api</artifactId>
         </dependency>
         <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
             <scope>provided</scope>
         </dependency>
     </dependencies>
@@ -55,7 +55,10 @@
                     <instructions>
                         <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                         <Bundle-Description>${project.description}</Bundle-Description>
-                        <Import-Package>org.apache.commons.logging, org.apache.servicemix.nmr.api</Import-Package>
+                        <Import-Package>
+                            org.slf4j,
+                            org.apache.servicemix.nmr.api
+                        </Import-Package>
                         <Private-Package>org.apache.servicemix.nmr.examples.nmr.endpoint</Private-Package>
                     </instructions>
                 </configuration>

Modified: servicemix/smx4/nmr/trunk/examples/nmr/endpoint/src/main/java/org/apache/servicemix/nmr/examples/nmr/endpoint/EchoEndpoint.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/examples/nmr/endpoint/src/main/java/org/apache/servicemix/nmr/examples/nmr/endpoint/EchoEndpoint.java?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/examples/nmr/endpoint/src/main/java/org/apache/servicemix/nmr/examples/nmr/endpoint/EchoEndpoint.java (original)
+++ servicemix/smx4/nmr/trunk/examples/nmr/endpoint/src/main/java/org/apache/servicemix/nmr/examples/nmr/endpoint/EchoEndpoint.java Tue Feb  8 16:32:54 2011
@@ -16,22 +16,22 @@
  */
 package org.apache.servicemix.nmr.examples.nmr.endpoint;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.nmr.api.Channel;
 import org.apache.servicemix.nmr.api.Endpoint;
 import org.apache.servicemix.nmr.api.Exchange;
 import org.apache.servicemix.nmr.api.Status;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class EchoEndpoint implements Endpoint {
 
-    private static final transient Log LOG = LogFactory.getLog(EchoEndpoint.class);
+    private final Logger logger = LoggerFactory.getLogger(EchoEndpoint.class);
 
     private Channel channel;
 
     public void process(Exchange exchange) {
         if (exchange.getStatus().equals(Status.Active)) {
-            LOG.info("Received in EchoEndpoint: " + exchange.getIn().getBody());
+            logger.info("Received in EchoEndpoint: {}", exchange.getIn().getBody());
             exchange.getOut().setBody("Echo" + exchange.getIn().getBody(), String.class);
             channel.send(exchange);
         }

Modified: servicemix/smx4/nmr/trunk/jbi/cluster/engine/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/cluster/engine/pom.xml?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/cluster/engine/pom.xml (original)
+++ servicemix/smx4/nmr/trunk/jbi/cluster/engine/pom.xml Tue Feb  8 16:32:54 2011
@@ -64,8 +64,13 @@
             <artifactId>geronimo-jta_1.1_spec</artifactId>
         </dependency>
         <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.springframework</groupId>

Modified: servicemix/smx4/nmr/trunk/jbi/cluster/engine/src/main/java/org/apache/servicemix/jbi/cluster/engine/ClusterEngine.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/cluster/engine/src/main/java/org/apache/servicemix/jbi/cluster/engine/ClusterEngine.java?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/cluster/engine/src/main/java/org/apache/servicemix/jbi/cluster/engine/ClusterEngine.java (original)
+++ servicemix/smx4/nmr/trunk/jbi/cluster/engine/src/main/java/org/apache/servicemix/jbi/cluster/engine/ClusterEngine.java Tue Feb  8 16:32:54 2011
@@ -52,8 +52,8 @@ import org.apache.servicemix.jbi.cluster
 import org.apache.servicemix.jbi.cluster.requestor.Transacted;
 import org.apache.servicemix.jbi.cluster.requestor.JmsRequestorListener;
 import org.apache.servicemix.jbi.cluster.requestor.JmsRequestorPool;
-import org.apache.commons.logging.LogFactory;
-import org.apache.commons.logging.Log;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Throttling
@@ -256,7 +256,7 @@ public class ClusterEngine extends Servi
      */
     protected static final String PROPERTY_SENDER_CLUSTER_NAME = "SenderClusterName";
 
-    protected static final Log logger = LogFactory.getLog(ClusterEngine.class);
+    protected final Logger logger = LoggerFactory.getLogger(ClusterEngine.class);
 
     protected boolean rollbackOnErrors = true;
     protected String name;
@@ -335,9 +335,7 @@ public class ClusterEngine extends Servi
 
     public void start() throws Exception {
         if (started.compareAndSet(false, true)) {
-            if (logger.isDebugEnabled()) {
-                logger.debug("Starting cluster endpoint: " + name);
-            }
+            logger.debug("Starting cluster endpoint: {}", name);
             pool.setListener(new JmsRequestorListener() {
                 public void onMessage(JmsRequestor requestor) throws Exception {
                     process(requestor);
@@ -350,9 +348,7 @@ public class ClusterEngine extends Servi
 
     public void destroy() throws Exception {
         if (started.compareAndSet(true, false)) {
-            if (logger.isDebugEnabled()) {
-                logger.debug("Stopping cluster endpoint: " + name);
-            }
+            logger.debug("Stopping cluster endpoint: {}", name);
             // TODO: We should first stop receiving new requests, then wait for all pending exchanges to be processed
 //            maxPendingExchanges = 0;
 //            if (pauseConsumption.compareAndSet(false, true)) {
@@ -367,18 +363,14 @@ public class ClusterEngine extends Servi
 
     public void pause() {
         if (pauseConsumption.compareAndSet(false, true)) {
-            if (logger.isDebugEnabled()) {
-                logger.debug("Pausing cluster endpoint: " + name);
-            }
+            logger.debug("Pausing cluster endpoint: {}", name);
             invalidateSelector();
         }
     }
 
     public void resume() {
         if (pauseConsumption.compareAndSet(true, false)) {
-            if (logger.isDebugEnabled()) {
-                logger.debug("Resuming cluster endpoint: " + name);
-            }
+            logger.debug("Resuming cluster endpoint: {}", name);
             invalidateSelector();
         }
     }

Modified: servicemix/smx4/nmr/trunk/jbi/cluster/engine/src/test/java/org/apache/servicemix/jbi/cluster/engine/AbstractClusterEndpointTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/cluster/engine/src/test/java/org/apache/servicemix/jbi/cluster/engine/AbstractClusterEndpointTest.java?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/cluster/engine/src/test/java/org/apache/servicemix/jbi/cluster/engine/AbstractClusterEndpointTest.java (original)
+++ servicemix/smx4/nmr/trunk/jbi/cluster/engine/src/test/java/org/apache/servicemix/jbi/cluster/engine/AbstractClusterEndpointTest.java Tue Feb  8 16:32:54 2011
@@ -23,13 +23,11 @@ import java.util.concurrent.ConcurrentHa
 import java.util.concurrent.TimeUnit;
 import java.io.File;
 import java.net.ServerSocket;
-import java.lang.management.ManagementFactory;
 
 import javax.jms.ConnectionFactory;
 import javax.xml.namespace.QName;
 import javax.transaction.TransactionManager;
 
-import junit.framework.TestCase;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.Service;
 import org.apache.activemq.ActiveMQConnectionFactory;
@@ -51,9 +49,9 @@ import org.apache.servicemix.jbi.runtime
 import org.apache.servicemix.jbi.cluster.requestor.Transacted;
 import org.apache.servicemix.jbi.cluster.requestor.GenericJmsRequestorPool;
 import org.apache.servicemix.jbi.cluster.requestor.AbstractPollingRequestorPool;
-import org.apache.commons.logging.LogFactory;
-import org.apache.commons.logging.Log;
 import org.jencks.GeronimoPlatformTransactionManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.core.task.TaskExecutor;
 import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
 import org.springframework.beans.factory.DisposableBean;
@@ -63,7 +61,7 @@ public abstract class AbstractClusterEnd
     public static final String PROXY_ENDPOINT_NAME = "proxy";
     public static final String RECEIVER_ENDPOINT_NAME = "receiver";
 
-    private final Log LOG = LogFactory.getLog(getClass());
+    private final Logger logger = LoggerFactory.getLogger(getClass());
 
     protected NMR nmr1;
     protected NMR nmr2;
@@ -76,9 +74,9 @@ public abstract class AbstractClusterEnd
 
     @Override
     protected void setUp() throws Exception {
-        LOG.info("============================================================");
-        LOG.info("     Starting test: " + this.toString());
-        LOG.info("============================================================");
+        logger.info("============================================================");
+        logger.info("     Starting test: {}", this.toString());
+        logger.info("============================================================");
         super.setUp();
         ExchangeImpl.getConverter();
         this.port = findFreePort();

Modified: servicemix/smx4/nmr/trunk/jbi/cluster/engine/src/test/java/org/apache/servicemix/jbi/cluster/engine/AutoFailTestSupport.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/cluster/engine/src/test/java/org/apache/servicemix/jbi/cluster/engine/AutoFailTestSupport.java?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/cluster/engine/src/test/java/org/apache/servicemix/jbi/cluster/engine/AutoFailTestSupport.java (original)
+++ servicemix/smx4/nmr/trunk/jbi/cluster/engine/src/test/java/org/apache/servicemix/jbi/cluster/engine/AutoFailTestSupport.java Tue Feb  8 16:32:54 2011
@@ -22,9 +22,8 @@ import java.lang.management.ThreadMXBean
 import java.util.concurrent.atomic.AtomicBoolean;
 
 import junit.framework.TestCase;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Enforces a test case to run for only an allotted time to prevent them from
@@ -36,7 +35,7 @@ import org.apache.commons.logging.LogFac
 public abstract class AutoFailTestSupport extends TestCase {
     public static final int EXIT_SUCCESS = 0;
     public static final int EXIT_ERROR = 1;
-    private static final Log LOG = LogFactory.getLog(AutoFailTestSupport.class);
+    private final Logger logger = LoggerFactory.getLogger(AutoFailTestSupport.class);
 
     private long maxTestTime = 5 * 60 * 1000; // 5 mins by default
     private Thread autoFailThread;
@@ -80,16 +79,13 @@ public abstract class AutoFailTestSuppor
                     // Check if the test was able to tear down succesfully,
                     // which usually means, it has finished its run.
                     if (!isTestSuccess.get()) {
-                        LOG.error("Test case has exceeded the maximum allotted time to run of: " + getMaxTestTime() + " ms.");
-                        LOG.fatal("Test case has exceeded the maximum allotted time to run of: " + getMaxTestTime() + " ms.");
+                        logger.error("Test case has exceeded the maximum allotted time to run of: {} ms", getMaxTestTime());
                         
-                        if (LOG.isDebugEnabled()) {
-                            ThreadMXBean threads = ManagementFactory.getThreadMXBean();
-                            ThreadInfo[]  threadInfos = threads.getThreadInfo(threads.getAllThreadIds(), 50);
+                        ThreadMXBean threads = ManagementFactory.getThreadMXBean();
+                        ThreadInfo[]  threadInfos = threads.getThreadInfo(threads.getAllThreadIds(), 50);
     
-                            for (ThreadInfo threadInfo : threadInfos) {
-                                LOG.debug(threadInfo);
-                            }
+                        for (ThreadInfo threadInfo : threadInfos) {
+                            logger.debug("{}", threadInfo);
                         }
 
                         System.exit(EXIT_ERROR);
@@ -99,10 +95,10 @@ public abstract class AutoFailTestSuppor
         }, "AutoFailThread");
 
         if (verbose) {
-            LOG.info("Starting auto fail thread...");
+            logger.info("Starting auto fail thread...");
         }
 
-        LOG.info("Starting auto fail thread...");
+        logger.info("Starting auto fail thread...");
         autoFailThread.start();
     }
 
@@ -116,10 +112,10 @@ public abstract class AutoFailTestSuppor
             isTestSuccess.set(true);
 
             if (verbose) {
-                LOG.info("Stopping auto fail thread...");
+                logger.info("Stopping auto fail thread...");
             }
 
-            LOG.info("Stopping auto fail thread...");
+            logger.info("Stopping auto fail thread...");
             autoFailThread.interrupt();
         }
     }

Modified: servicemix/smx4/nmr/trunk/jbi/cluster/requestor/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/cluster/requestor/pom.xml?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/cluster/requestor/pom.xml (original)
+++ servicemix/smx4/nmr/trunk/jbi/cluster/requestor/pom.xml Tue Feb  8 16:32:54 2011
@@ -44,10 +44,6 @@
             <artifactId>geronimo-jta_1.1_spec</artifactId>
         </dependency>
         <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-        </dependency>
-        <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-jms</artifactId>
         </dependency>

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/pom.xml?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/pom.xml (original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/pom.xml Tue Feb  8 16:32:54 2011
@@ -48,6 +48,11 @@
             <artifactId>org.apache.felix.fileinstall</artifactId>
         </dependency>
         <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
             <groupId>org.apache.xbean</groupId>
             <artifactId>xbean-classloader</artifactId>
             <scope>provided</scope>
@@ -62,11 +67,6 @@
             <artifactId>org.apache.servicemix.bundles.ant</artifactId>
         </dependency>
         <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
             <groupId>org.easymock</groupId>
             <artifactId>easymock</artifactId>
             <scope>test</scope>
@@ -86,6 +86,12 @@
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+            <scope>test</scope>
         </dependency>
     </dependencies>
 

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/artifacts/AbstractLifecycleJbiArtifact.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/artifacts/AbstractLifecycleJbiArtifact.java?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/artifacts/AbstractLifecycleJbiArtifact.java (original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/artifacts/AbstractLifecycleJbiArtifact.java Tue Feb  8 16:32:54 2011
@@ -20,12 +20,12 @@ import java.io.IOException;
 import javax.jbi.management.LifeCycleMBean;
 import javax.jbi.JBIException;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.jbi.deployer.impl.Storage;
 import org.apache.servicemix.nmr.api.event.ListenerRegistry;
 import org.apache.servicemix.jbi.deployer.events.LifeCycleEvent;
 import org.apache.servicemix.jbi.deployer.events.LifeCycleListener;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public abstract class AbstractLifecycleJbiArtifact implements LifeCycleMBean {
 
@@ -38,7 +38,7 @@ public abstract class AbstractLifecycleJ
         Shutdown,
     }
 
-    protected final Log LOGGER = LogFactory.getLog(getClass());
+    protected final Logger logger = LoggerFactory.getLogger(getClass());
 
     protected State state = State.Unknown;
     protected Storage storage;
@@ -83,7 +83,7 @@ public abstract class AbstractLifecycleJ
         try {
             this.storage.save();
         } catch (IOException e) {
-            LOGGER.warn("Unable to persist state", e);
+            logger.warn("Unable to persist state", e);
         }
         this.runningState = state;
     }

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/artifacts/ComponentImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/artifacts/ComponentImpl.java?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/artifacts/ComponentImpl.java (original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/artifacts/ComponentImpl.java Tue Feb  8 16:32:54 2011
@@ -118,7 +118,7 @@ public class ComponentImpl extends Abstr
     }
 
     public void start(boolean saveState) throws JBIException {
-        LOGGER.info("Starting component " + getName());
+        logger.info("Starting component " + getName());
         if (state != State.Started) {
             if (state == State.Shutdown) {
                 component.getLifeCycle().init(null);
@@ -150,7 +150,7 @@ public class ComponentImpl extends Abstr
     }
 
     public void stop(boolean saveState) throws JBIException {
-        LOGGER.info("Stopping component " + getName());
+        logger.info("Stopping component " + getName());
         if (state == State.Started) {
             fireEvent(LifeCycleEvent.LifeCycleEventType.Stopping);
             // Stop component
@@ -172,7 +172,7 @@ public class ComponentImpl extends Abstr
     }
 
     public void shutDown(boolean saveState, boolean force) throws JBIException {
-        LOGGER.info("Shutting down component " + getName());
+        logger.info("Shutting down component " + getName());
         if (state == State.Started) {
             stop(saveState);
         }

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/artifacts/ServiceAssemblyImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/artifacts/ServiceAssemblyImpl.java?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/artifacts/ServiceAssemblyImpl.java (original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/artifacts/ServiceAssemblyImpl.java Tue Feb  8 16:32:54 2011
@@ -266,7 +266,7 @@ public class ServiceAssemblyImpl extends
     }
 
     protected void transition(Action action, State to) throws JBIException {
-        LOGGER.info("Changing SA state to " + to);
+        logger.info("Changing SA state to " + to);
         State from = state;
         List<ServiceUnitImpl> success = new ArrayList<ServiceUnitImpl>();
         for (ServiceUnitImpl su : serviceUnits) {
@@ -335,9 +335,9 @@ public class ServiceAssemblyImpl extends
             @Override
             public void run() {
                 try {
-                    LOGGER.debug("Waiting for " + shutdownTimeout + " milliseconds to a clean shutdown of SA " + ServiceAssemblyImpl.this.getName());
+                    logger.debug("Waiting for " + shutdownTimeout + " milliseconds to a clean shutdown of SA " + ServiceAssemblyImpl.this.getName());
                     if (!semaphore.tryAcquire(shutdownTimeout, TimeUnit.MILLISECONDS)) {
-                        LOGGER.warn("Unable to do a clean shutdown of SA " + ServiceAssemblyImpl.this.getName() + ", canceling all sync exchanges");
+                        logger.warn("Unable to do a clean shutdown of SA " + ServiceAssemblyImpl.this.getName() + ", canceling all sync exchanges");
                         listener.cancelPendingSyncExchanges(ServiceAssemblyImpl.this);                        
                     }
                 } catch (InterruptedException e) {

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/artifacts/ServiceUnitImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/artifacts/ServiceUnitImpl.java?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/artifacts/ServiceUnitImpl.java (original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/artifacts/ServiceUnitImpl.java Tue Feb  8 16:32:54 2011
@@ -24,19 +24,19 @@ import javax.jbi.JBIException;
 import javax.jbi.management.ComponentLifeCycleMBean;
 import javax.jbi.management.DeploymentException;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.jbi.deployer.Component;
 import org.apache.servicemix.jbi.deployer.ServiceAssembly;
 import org.apache.servicemix.jbi.deployer.ServiceUnit;
 import org.apache.servicemix.jbi.deployer.descriptor.ServiceUnitDesc;
 import org.apache.servicemix.jbi.deployer.utils.ManagementSupport;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.w3c.dom.Element;
 
 public class ServiceUnitImpl implements ServiceUnit {
 
-    protected final Log LOGGER = LogFactory.getLog(getClass());
+    protected final Logger logger = LoggerFactory.getLogger(getClass());
 
     private ServiceUnitDesc serviceUnitDesc;
 

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/artifacts/SharedLibraryImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/artifacts/SharedLibraryImpl.java?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/artifacts/SharedLibraryImpl.java (original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/artifacts/SharedLibraryImpl.java Tue Feb  8 16:32:54 2011
@@ -20,8 +20,6 @@ import java.net.URL;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.jbi.deployer.Component;
 import org.apache.servicemix.jbi.deployer.SharedLibrary;
 import org.apache.servicemix.jbi.deployer.descriptor.DescriptorFactory;
@@ -29,13 +27,15 @@ import org.apache.servicemix.jbi.deploye
 import org.apache.servicemix.jbi.deployer.impl.AdminService;
 import org.apache.servicemix.nmr.management.Nameable;
 import org.osgi.framework.Bundle;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * SharedLibrary object
  */
 public class SharedLibraryImpl implements SharedLibrary, Nameable {
 
-    protected final Log LOGGER = LogFactory.getLog(getClass());
+    protected final Logger logger = LoggerFactory.getLogger(getClass());
 
     private SharedLibraryDesc library;
     private Bundle bundle;

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/Connection.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/Connection.java?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/Connection.java (original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/Connection.java Tue Feb  8 16:32:54 2011
@@ -26,9 +26,9 @@ import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLConnection;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.jbi.deployer.utils.FileUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * A URL connection to handle the JBI to OSGi transformation
@@ -36,7 +36,7 @@ import org.apache.servicemix.jbi.deploye
  */
 public class Connection extends URLConnection {
 
-    private static Log logger = LogFactory.getLog(Connection.class);
+    private final Logger logger = LoggerFactory.getLogger(Connection.class);
 
     private final Parser parser;
 

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/JBIDeploymentListener.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/JBIDeploymentListener.java?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/JBIDeploymentListener.java (original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/JBIDeploymentListener.java Tue Feb  8 16:32:54 2011
@@ -22,10 +22,10 @@ import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
 import java.util.jar.Manifest;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.jbi.deployer.descriptor.DescriptorFactory;
 import org.apache.felix.fileinstall.ArtifactTransformer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * A JBI DeploymentListener which transforms plain JBI artifacts to OSGi bundles.
@@ -34,7 +34,7 @@ import org.apache.felix.fileinstall.Arti
  */
 public class JBIDeploymentListener implements ArtifactTransformer {
 
-    private static final Log Logger = LogFactory.getLog(JBIDeploymentListener.class);
+    private final Logger logger = LoggerFactory.getLogger(JBIDeploymentListener.class);
 
     /**
      * Check if the file is a recognized JBI artifact that needs to be
@@ -90,7 +90,7 @@ public class JBIDeploymentListener imple
             return destFile;
 
         } catch (Exception e) {
-            Logger.error("Failed in transforming the JBI artifact to be OSGified. error is: " + e);
+            logger.error("Failed in transforming the JBI artifact to be OSGified", e);
             return null;
         }
     }

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/AbstractInstaller.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/AbstractInstaller.java?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/AbstractInstaller.java (original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/AbstractInstaller.java Tue Feb  8 16:32:54 2011
@@ -27,8 +27,6 @@ import java.util.Enumeration;
 import javax.jbi.JBIException;
 import javax.management.ObjectName;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.jbi.deployer.artifacts.AbstractLifecycleJbiArtifact;
 import org.apache.servicemix.jbi.deployer.descriptor.Descriptor;
 import org.apache.servicemix.jbi.deployer.handler.Transformer;
@@ -36,6 +34,8 @@ import org.apache.servicemix.jbi.deploye
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Installers are used to controll the installation / deployment process of JBI artifacts
@@ -47,7 +47,7 @@ public abstract class AbstractInstaller 
 
     public static final String LAST_INSTALL = "jbi.deployer.install";
 
-    protected final Log LOGGER = LogFactory.getLog(getClass());
+    protected final Logger logger = LoggerFactory.getLogger(getClass());
 
     protected Deployer deployer;
     protected Descriptor descriptor;
@@ -122,7 +122,7 @@ public abstract class AbstractInstaller 
                 try {
                     is.close();
                 } catch (IOException io) {
-                    LOGGER.info("Failed to close stream. " + io, io);
+                    logger.info("Failed to close stream.", io);
                 }
             }
             throw e;

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/ComponentInstaller.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/ComponentInstaller.java?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/ComponentInstaller.java (original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/ComponentInstaller.java Tue Feb  8 16:32:54 2011
@@ -152,7 +152,7 @@ public class ComponentInstaller extends 
                 return name;
             }
         } catch (Exception e) {
-            LOGGER.error(e.getMessage());
+            logger.error(e.getMessage());
             throw new JBIException(e);
         }
     }
@@ -230,7 +230,7 @@ public class ComponentInstaller extends 
         try {
             deleteStorage();
         } catch (IOException e) {
-            LOGGER.warn("Error cleaning persistent state for component: " + getName(), e);
+            logger.warn("Error cleaning persistent state for component: " + getName(), e);
         }
         // Uninstall bundle
         uninstallBundle();
@@ -288,7 +288,7 @@ public class ComponentInstaller extends 
         for (int i = 0; i < classPathNames.length; i++) {
             File f = new File(installRoot, classPathNames[i]);
             if (!f.exists()) {
-                LOGGER.warn("Component classpath entry not found: '" + classPathNames[i] + "'");
+                logger.warn("Component classpath entry not found: '" + classPathNames[i] + "'");
             }
             try {
                 urls.add(f.getCanonicalFile().toURL());
@@ -337,7 +337,7 @@ public class ComponentInstaller extends 
                 initialized = true;
             }
         } catch (JBIException e) {
-            LOGGER.error("Could not initialize bootstrap", e);
+            logger.error("Could not initialize bootstrap", e);
             throw new DeploymentException(e);
         }
     }
@@ -349,7 +349,7 @@ public class ComponentInstaller extends 
                 Thread.currentThread().setContextClassLoader(bootstrap.getClass().getClassLoader());
                 bootstrap.cleanUp();
             } catch (JBIException e) {
-                LOGGER.error("Could not initialize bootstrap", e);
+                logger.error("Could not initialize bootstrap", e);
                 throw new DeploymentException(e);
             } finally {
                 initialized = false;
@@ -377,13 +377,13 @@ public class ComponentInstaller extends 
             Class bootstrapClass = cl.loadClass(descriptor.getBootstrapClassName());
             return (Bootstrap) bootstrapClass.newInstance();
         } catch (ClassNotFoundException e) {
-            LOGGER.error("Class not found: " + descriptor.getBootstrapClassName(), e);
+            logger.error("Class not found: " + descriptor.getBootstrapClassName(), e);
             throw new DeploymentException(e);
         } catch (InstantiationException e) {
-            LOGGER.error("Could not instantiate : " + descriptor.getBootstrapClassName(), e);
+            logger.error("Could not instantiate : " + descriptor.getBootstrapClassName(), e);
             throw new DeploymentException(e);
         } catch (IllegalAccessException e) {
-            LOGGER.error("Illegal access on: " + descriptor.getBootstrapClassName(), e);
+            logger.error("Illegal access on: " + descriptor.getBootstrapClassName(), e);
             throw new DeploymentException(e);
         } finally {
             Thread.currentThread().setContextClassLoader(oldCl);
@@ -429,7 +429,7 @@ public class ComponentInstaller extends 
         if (props != null && props.size() > 0) {
             ObjectName on = getInstallerConfigurationMBean();
             if (on == null) {
-                LOGGER.warn("Could not find installation configuration MBean. Installation properties will be ignored.");
+                logger.warn("Could not find installation configuration MBean. Installation properties will be ignored.");
             } else {
                 MBeanServer mbs = deployer.getEnvironment().getMBeanServer();
                 for (Object o : props.keySet()) {

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/Deployer.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/Deployer.java?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/Deployer.java (original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/Deployer.java Tue Feb  8 16:32:54 2011
@@ -29,10 +29,7 @@ import java.util.HashSet;
 import java.util.concurrent.ConcurrentHashMap;
 
 import javax.jbi.JBIException;
-import javax.management.MBeanServer;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.jbi.deployer.Component;
 import org.apache.servicemix.common.osgi.DeployedAssembly;
 import org.apache.servicemix.jbi.deployer.ServiceAssembly;
@@ -59,16 +56,15 @@ import org.apache.servicemix.jbi.runtime
 import org.apache.servicemix.jbi.runtime.Environment;
 import org.apache.servicemix.nmr.api.event.ListenerRegistry;
 import org.apache.servicemix.nmr.core.ListenerRegistryImpl;
-import org.fusesource.commons.management.ManagementStrategy;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
 import org.osgi.framework.ServiceRegistration;
 import org.osgi.framework.SynchronousBundleListener;
 import org.osgi.framework.BundleEvent;
-import org.osgi.service.prefs.Preferences;
-import org.osgi.service.prefs.PreferencesService;
 import org.osgi.util.tracker.ServiceTracker;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Deployer for JBI artifacts
@@ -80,7 +76,7 @@ public class Deployer implements Synchro
     public static final String TYPE_SERVICE_ENGINE = "service-engine";
     public static final String TYPE_BINDING_COMPONENT = "binding-component";
 
-    private static final Log LOGGER = LogFactory.getLog(Deployer.class);
+    private final Logger logger = LoggerFactory.getLogger(Deployer.class);
 
     private BundleContext bundleContext;
     private final Set<Bundle> bundles = new HashSet<Bundle>();
@@ -205,7 +201,7 @@ public class Deployer implements Synchro
         try {
             s.load();
         } catch (IOException e) {
-            LOGGER.warn("Error loading JBI artifacts state", e);
+            logger.warn("Error loading JBI artifacts state", e);
         }
         this.storage = s;
         // Track bundles
@@ -278,10 +274,10 @@ public class Deployer implements Synchro
     }
 
     protected boolean match(Bundle bundle) {
-        LOGGER.debug("Checking bundle: '" + OsgiStringUtils.nullSafeNameAndSymName(bundle) + "'");
+        logger.debug("Checking bundle: '{}'", OsgiStringUtils.nullSafeNameAndSymName(bundle));
         URL url = bundle.getResource(DescriptorFactory.DESCRIPTOR_FILE);
         if (url == null) {
-            LOGGER.debug("Bundle '" + OsgiStringUtils.nullSafeNameAndSymName(bundle) + "' does not contain any JBI descriptor.");
+            logger.debug("Bundle '{}' does not contain any JBI descriptor.", OsgiStringUtils.nullSafeNameAndSymName(bundle));
             return false;
         }
         return true;
@@ -314,13 +310,13 @@ public class Deployer implements Synchro
                     Descriptor descriptor = DescriptorFactory.buildDescriptor(url);
                     DescriptorFactory.checkDescriptor(descriptor);
                     if (descriptor.getSharedLibrary() != null) {
-                        LOGGER.info("Deploying bundle '" + OsgiStringUtils.nullSafeNameAndSymName(bundle) + "' as a JBI shared library");
+                        logger.info("Deploying bundle '{}' as a JBI shared library", OsgiStringUtils.nullSafeNameAndSymName(bundle));
                         installer = new SharedLibraryInstaller(this, descriptor, null, true);
                     } else if (descriptor.getComponent() != null) {
-                        LOGGER.info("Deploying bundle '" + OsgiStringUtils.nullSafeNameAndSymName(bundle) + "' as a JBI component");
+                        logger.info("Deploying bundle '{}' as a JBI component", OsgiStringUtils.nullSafeNameAndSymName(bundle));
                         installer = new ComponentInstaller(this, descriptor, null, true);
                     } else if (descriptor.getServiceAssembly() != null) {
-                        LOGGER.info("Deploying bundle '" + OsgiStringUtils.nullSafeNameAndSymName(bundle) + "' as a JBI service assembly");
+                        logger.info("Deploying bundle '{}' as a JBI service assembly", OsgiStringUtils.nullSafeNameAndSymName(bundle));
                         installer = new ServiceAssemblyInstaller(this, descriptor, (File) null, true);
                     } else {
                         throw new IllegalStateException("Unrecognized JBI descriptor: " + url);
@@ -336,10 +332,10 @@ public class Deployer implements Synchro
                     installers.put(bundle, installer);
                 } catch (PendingException e) {
                     pendingInstallers.add(installer);
-                    LOGGER.warn("Requirements not met for JBI artifact in bundle " + OsgiStringUtils.nullSafeNameAndSymName(bundle) + ". Installation pending. " + e);
+                    logger.warn("Requirements not met for JBI artifact in bundle {}. Installation pending. ", OsgiStringUtils.nullSafeNameAndSymName(bundle), e);
                 }
             } catch (Exception e) {
-                LOGGER.error("Error handling bundle start event", e);
+                logger.error("Error handling bundle start event", e);
             } finally {
                 Thread.currentThread().setContextClassLoader(cl);
             }
@@ -354,7 +350,7 @@ public class Deployer implements Synchro
                 try {
                     installer.stop(true);
                 } catch (Exception e) {
-                    LOGGER.warn("Error shutting down JBI artifact", e);
+                    logger.warn("Error shutting down JBI artifact", e);
                 }
             }
         }
@@ -372,7 +368,7 @@ public class Deployer implements Synchro
                     installer.uninstall(true);
 
                 } catch (Exception e) {
-                    LOGGER.warn("Error uninstalling JBI artifact", e);
+                    logger.warn("Error uninstalling JBI artifact", e);
                 }
             }
         } else {
@@ -391,7 +387,7 @@ public class Deployer implements Synchro
         Dictionary<String, String> props = new Hashtable<String, String>();
         // populate props from the library meta-data
         props.put(NAME, sharedLibraryDesc.getIdentification().getName());
-        LOGGER.debug("Registering JBI Shared Library");
+        logger.debug("Registering JBI Shared Library");
         registerService(bundle, SharedLibrary.class.getName(), sl, props);
         if (!getEnvironment().isManaged(sl)) {
         	getEnvironment().manageObject(sl);
@@ -414,7 +410,7 @@ public class Deployer implements Synchro
         }
         components.put(name, component);
         // register the component in the OSGi registry
-        LOGGER.debug("Registering JBI component");
+        logger.debug("Registering JBI component");
         registerService(bundle, new String[] { Component.class.getName(), ComponentWrapper.class.getName() },
                         component, props);
         // Now, register the inner component
@@ -440,7 +436,7 @@ public class Deployer implements Synchro
         Dictionary<String, String> props = new Hashtable<String, String>();
         props.put(NAME, serviceAssemblyDesc.getIdentification().getName());
         // register the service assembly in the OSGi registry
-        LOGGER.debug("Registering JBI service assembly");
+        logger.debug("Registering JBI service assembly");
         registerService(bundle, ServiceAssembly.class.getName(), sa, props);
         if (!getEnvironment().isManaged(sa)) {
         	//check if this SA is managed, this is the case that restart SA bundle
@@ -474,13 +470,13 @@ public class Deployer implements Synchro
                                 installers.remove(bundle);
                             }
                         } catch (Exception e) {
-                            LOGGER.warn("Error uninstalling service assembly", e);
+                            logger.warn("Error uninstalling service assembly", e);
                         }
                     }
                 }
                 unregisterServices(component.getBundle());
             } catch (JBIException e) {
-                LOGGER.warn("Error when shutting down component", e);
+                logger.warn("Error when shutting down component", e);
             }
             for (SharedLibrary lib : component.getSharedLibraries()) {
                 ((SharedLibraryImpl) lib).removeComponent(component);
@@ -489,7 +485,7 @@ public class Deployer implements Synchro
             try {
 				getEnvironment().unmanageObject(component);
 			} catch (Exception e) {
-				LOGGER.error("Error unmanage component: " + component.getName(), e);
+				logger.error("Error unmanage component: {}", component.getName(), e);
 			}
         }
     }
@@ -502,7 +498,7 @@ public class Deployer implements Synchro
             try {
 				getEnvironment().unmanageObject(assembly);
 			} catch (Exception e) {
-				LOGGER.error("Error unmanage service assembly: " + assembly.getName(), e);
+				logger.error("Error unmanage service assembly: {}", assembly.getName(), e);
 			}
             for (ServiceUnitImpl su : assembly.getServiceUnitsList()) {
                 su.getComponentImpl().removeServiceUnit(su);
@@ -517,7 +513,7 @@ public class Deployer implements Synchro
             try {
 				getEnvironment().unmanageObject(library);
 			} catch (Exception e) {
-				LOGGER.error("Error unmanage sharedlibrary: " + library.getName(), e);
+				logger.error("Error unmanage sharedlibrary: {}", library.getName(), e);
 			}
         }
     }
@@ -560,7 +556,7 @@ public class Deployer implements Synchro
                 } catch (PendingException e) {
                     pendingInstallers.add(installer);
                 } catch (Exception e) {
-                    LOGGER.warn("Error installing JBI artifact", e);
+                    logger.warn("Error installing JBI artifact", e);
                 }
             }
         }
@@ -657,7 +653,7 @@ public class Deployer implements Synchro
                 installer.install();
                 bundles.add(reference.getBundle());
             } catch (Exception e) {
-                LOGGER.warn("Error registering deployed component", e);
+                logger.warn("Error registering deployed component", e);
             }
 
 //            Preferences prefs = preferencesService.getUserPreferences(name);
@@ -707,11 +703,11 @@ public class Deployer implements Synchro
                 installers.put(installer.getBundle(), installer);
             } catch (PendingException e) {
                 pendingInstallers.add(installer);
-                LOGGER.warn("Requirements not met for JBI artifact in bundle " + OsgiStringUtils.nullSafeNameAndSymName(reference.getBundle()) + ". Installation pending. " + e);
+                logger.warn("Requirements not met for JBI artifact in bundle {}. Installation pending. ", OsgiStringUtils.nullSafeNameAndSymName(reference.getBundle()), e);
             }
             bundles.add(reference.getBundle());
         } catch (Exception e) {
-            LOGGER.error("Error registering deployed service assembly", e);
+            logger.error("Error registering deployed service assembly", e);
         }
     }
 
@@ -731,7 +727,7 @@ public class Deployer implements Synchro
                     su.undeploy();
                 }
             } catch (Exception e) {
-                LOGGER.error("Error unregistering deployed service assembly", e);
+                logger.error("Error unregistering deployed service assembly", e);
             } finally {
                 unregisterServiceAssembly(sa);
             }

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/DeploymentService.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/DeploymentService.java?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/DeploymentService.java (original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/DeploymentService.java Tue Feb  8 16:32:54 2011
@@ -23,8 +23,6 @@ import java.util.Set;
 import javax.jbi.management.DeploymentServiceMBean;
 import javax.jbi.management.LifeCycleMBean;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.jbi.deployer.Component;
 import org.apache.servicemix.jbi.deployer.ServiceAssembly;
 import org.apache.servicemix.jbi.deployer.ServiceUnit;
@@ -35,10 +33,12 @@ import org.apache.servicemix.jbi.deploye
 import org.apache.servicemix.jbi.deployer.handler.Transformer;
 import org.apache.servicemix.jbi.deployer.utils.ManagementSupport;
 import org.osgi.framework.BundleContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class DeploymentService implements DeploymentServiceMBean {
 
-    private static final Log LOG = LogFactory.getLog(DeploymentService.class);
+    private final Logger logger = LoggerFactory.getLogger(DeploymentService.class);
 
     private Deployer deployer;
     private BundleContext bundleContext;
@@ -87,7 +87,7 @@ public class DeploymentService implement
                 }
                 checkSus(sa.getServiceUnits());
                 String name = sa.getIdentification().getName();
-                LOG.info("Deploy ServiceAssembly " + name);
+                logger.info("Deploy ServiceAssembly {}", name);
                 ServiceAssemblyInstaller installer = new ServiceAssemblyInstaller(deployer, root, jarfile, autoStart);
                 installer.installBundle();
                 installer.init();
@@ -97,7 +97,7 @@ public class DeploymentService implement
                 throw new RuntimeException("location for deployment SA: " + saZipURL + " isn't a valid file");
             }
         } catch (Exception e) {
-            LOG.error("Error deploying service assembly", e);
+            logger.error("Error deploying service assembly", e);
             throw e;
         }
     }
@@ -179,7 +179,7 @@ public class DeploymentService implement
             sa.start();
             return ManagementSupport.createSuccessMessage("start service assembly successfully", serviceAssemblyName);
         } catch (Exception e) {
-            LOG.info("Error in start", e);
+            logger.info("Error in start", e);
             throw e;
         }
     }
@@ -193,7 +193,7 @@ public class DeploymentService implement
             sa.stop();
             return ManagementSupport.createSuccessMessage("stop service assembly successfully", serviceAssemblyName);
         } catch (Exception e) {
-            LOG.info("Error in stop", e);
+            logger.info("Error in stop", e);
             throw e;
         }
     }
@@ -207,7 +207,7 @@ public class DeploymentService implement
             sa.shutDown();
             return ManagementSupport.createSuccessMessage("shutdown service assembly successfully", serviceAssemblyName);
         } catch (Exception e) {
-            LOG.info("Error in shutdown", e);
+            logger.info("Error in shutdown", e);
             throw e;
         }
     }
@@ -220,7 +220,7 @@ public class DeploymentService implement
             }
             return sa.getCurrentState();
         } catch (Exception e) {
-            LOG.info("Error in getState", e);
+            logger.info("Error in getState", e);
             throw e;
         }
     }

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/InstallationService.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/InstallationService.java?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/InstallationService.java (original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/InstallationService.java Tue Feb  8 16:32:54 2011
@@ -23,17 +23,17 @@ import javax.jbi.management.DeploymentEx
 import javax.jbi.management.InstallationServiceMBean;
 import javax.management.ObjectName;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.jbi.deployer.SharedLibrary;
 import org.apache.servicemix.jbi.deployer.Component;
 import org.apache.servicemix.jbi.deployer.descriptor.Descriptor;
 import org.apache.servicemix.jbi.deployer.handler.Transformer;
 import org.apache.servicemix.jbi.deployer.utils.ManagementSupport;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class InstallationService implements InstallationServiceMBean {
 
-    private static final Log LOG = LogFactory.getLog(InstallationService.class);
+    private final Logger logger = LoggerFactory.getLogger(InstallationService.class);
 
     private Deployer deployer;
 
@@ -49,13 +49,11 @@ public class InstallationService impleme
      */
     public synchronized ObjectName loadNewInstaller(String installJarURL) {
         try {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Loading new installer from " + installJarURL);
-            }
+            logger.debug("Loading new installer from {}", installJarURL);
             ComponentInstaller installer = doLoadNewInstaller(installJarURL, false);
             return installer.getObjectName();
         } catch (Throwable t) {
-            LOG.error("Deployment failed", t);
+            logger.error("Deployment failed", t);
             if (t instanceof Error) {
                 throw (Error) t;
             }
@@ -84,7 +82,7 @@ public class InstallationService impleme
             return installer != null ? installer.getObjectName() : null;
         } catch (Exception e) {
             String errStr = "Error loading installer: " + componentName;
-            LOG.error(errStr, e);
+            logger.error(errStr, e);
             return null;
         }
     }
@@ -111,7 +109,7 @@ public class InstallationService impleme
             }
         } catch (Exception e) {
             String errStr = "Error unloading installer: " + componentName;
-            LOG.error(errStr, e);
+            logger.error(errStr, e);
         }
         return result;
     }
@@ -180,7 +178,7 @@ public class InstallationService impleme
                 throw new DeploymentException("JBI descriptor is not a shared library descriptor");
             }
             String slName = desc.getSharedLibrary().getIdentification().getName();
-            LOG.info("Installing shared library " + slName);
+            logger.info("Installing shared library {}", slName);
             if (deployer.getSharedLibrary(slName) != null) {
                 throw new DeploymentException("ShareLib " + slName + " is already installed");
             }

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/ServiceAssemblyInstaller.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/ServiceAssemblyInstaller.java?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/ServiceAssemblyInstaller.java (original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/ServiceAssemblyInstaller.java Tue Feb  8 16:32:54 2011
@@ -97,7 +97,7 @@ public class ServiceAssemblyInstaller ex
             ServiceAssembly sa = deployer.registerServiceAssembly(bundle, descriptor.getServiceAssembly(), sus);
             return deployer.getEnvironment().getManagedObjectName(sa);
         } catch (Exception e) {
-            LOGGER.error(e.getMessage());
+            logger.error(e.getMessage());
             throw new JBIException(e);
         }
     }
@@ -153,7 +153,7 @@ public class ServiceAssemblyInstaller ex
         try {
             deleteStorage();
         } catch (IOException e) {
-            LOGGER.warn("Error cleaning persistent state for component: " + getName(), e);
+            logger.warn("Error cleaning persistent state for component: " + getName(), e);
         }
         // Uninstall bundle
         uninstallBundle();
@@ -174,7 +174,7 @@ public class ServiceAssemblyInstaller ex
                 try {
                     su.undeploy();
                 } catch (Exception e) {
-                    LOGGER.warn("Problem undeploying SU " + su.getName());
+                    logger.warn("Problem undeploying SU " + su.getName());
                 }
             }
         }
@@ -202,14 +202,14 @@ public class ServiceAssemblyInstaller ex
             // Create service unit object
             ServiceUnitImpl su = deployer.createServiceUnit(sud, suRootDir, component);
             try {
-                LOGGER.debug("Deploying SU " + su.getName());
+                logger.debug("Deploying SU " + su.getName());
                 if (isModified) {
                     su.deploy();
                 }
                 // Add it to the list
                 sus.add(su);
             } catch (Throwable e) {
-                LOGGER.error("Error deploying SU " + su.getName(), e);
+                logger.error("Error deploying SU " + su.getName(), e);
                 failure = new Exception("Error deploying SU " + su.getName(), e);
                 break;
             }
@@ -218,10 +218,10 @@ public class ServiceAssemblyInstaller ex
         if (failure != null) {
             for (ServiceUnitImpl su : sus) {
                 try {
-                    LOGGER.debug("Undeploying SU " + su.getName());
+                    logger.debug("Undeploying SU " + su.getName());
                     su.undeploy();
                 } catch (Exception e) {
-                    LOGGER.warn("Error undeploying SU " + su.getName(), e);
+                    logger.warn("Error undeploying SU " + su.getName(), e);
                 }
             }
             throw failure;
@@ -234,18 +234,18 @@ public class ServiceAssemblyInstaller ex
             Bundle bundle = getBundle();
 
             if (bundle == null) {
-                LOGGER.warn("Could not find Bundle for Service Assembly: " + getName());
+                logger.warn("Could not find Bundle for Service Assembly: " + getName());
             } else {
                 bundle.stop();
                 bundle.uninstall();
                 try {
                     deleteStorage();
                 } catch (IOException e) {
-                    LOGGER.warn("Error cleaning persistent state for service assembly: " + getName(), e);
+                    logger.warn("Error cleaning persistent state for service assembly: " + getName(), e);
                 }
             }
         } catch (BundleException e) {
-            LOGGER.error("failed to uninstall Service Assembly: " + getName(), e);
+            logger.error("failed to uninstall Service Assembly: " + getName(), e);
             throw new JBIException(e);
         }
     }

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/SharedLibraryInstaller.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/SharedLibraryInstaller.java?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/SharedLibraryInstaller.java (original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/SharedLibraryInstaller.java Tue Feb  8 16:32:54 2011
@@ -52,7 +52,7 @@ public class SharedLibraryInstaller exte
             SharedLibrary sl = deployer.registerSharedLibrary(bundle, descriptor.getSharedLibrary(), createClassLoader());
             return deployer.getEnvironment().getManagedObjectName(sl);
         } catch (Exception e) {
-            LOGGER.error(e.getMessage());
+            logger.error(e.getMessage());
             throw new JBIException(e);
         }
     }
@@ -96,7 +96,7 @@ public class SharedLibraryInstaller exte
         try {
             deleteStorage();
         } catch (IOException e) {
-            LOGGER.warn("Error cleaning persistent state for component: " + getName(), e);
+            logger.warn("Error cleaning persistent state for component: " + getName(), e);
         }
         // Uninstall bundle
         uninstallBundle();
@@ -115,7 +115,7 @@ public class SharedLibraryInstaller exte
         for (String classPathName : classPathNames) {
             File f = new File(installRoot, classPathName);
             if (!f.exists()) {
-                LOGGER.warn("Shared library classpath entry not found: '" + classPathName + "'");
+                logger.warn("Shared library classpath entry not found: '" + classPathName + "'");
             }
             try {
                 urls.add(f.getCanonicalFile().toURL());

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/utils/ManagementSupport.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/utils/ManagementSupport.java?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/utils/ManagementSupport.java (original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/utils/ManagementSupport.java Tue Feb  8 16:32:54 2011
@@ -27,10 +27,10 @@ import javax.xml.parsers.DocumentBuilder
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.jbi.runtime.impl.utils.DOMUtil;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
@@ -75,7 +75,7 @@ public final class ManagementSupport {
 
     private static final String WRAPPER = "wrapper";
     
-    private static final Log LOG = LogFactory.getLog(ManagementSupport.class);
+    private final static Logger logger = LoggerFactory.getLogger(ManagementSupport.class);
 
     private ManagementSupport() {
     }
@@ -226,7 +226,7 @@ public final class ManagementSupport {
             }
             return DOMUtil.asIndentedXML(doc);
         } catch (Exception e) {
-            LOG.error("Error", e);
+            logger.error("Error", e);
             return null;
         }
     }
@@ -290,9 +290,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);
         }
     }
@@ -364,7 +362,7 @@ public final class ManagementSupport {
                                                                       "Unable to parse result string", e);
                 }
             } catch (Exception e2) {
-                LOG.error(e2);
+                logger.error("", e2);
                 result = null;
             }
         }

Modified: servicemix/smx4/nmr/trunk/jbi/osgi/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/osgi/pom.xml?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/osgi/pom.xml (original)
+++ servicemix/smx4/nmr/trunk/jbi/osgi/pom.xml Tue Feb  8 16:32:54 2011
@@ -59,6 +59,10 @@
             <groupId>org.fusesource.commonman</groupId>
             <artifactId>commons-management</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
     </dependencies>
 
     <build>

Modified: servicemix/smx4/nmr/trunk/jbi/osgi/src/main/java/org/apache/servicemix/jbi/osgi/RegistryWrapper.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/osgi/src/main/java/org/apache/servicemix/jbi/osgi/RegistryWrapper.java?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/osgi/src/main/java/org/apache/servicemix/jbi/osgi/RegistryWrapper.java (original)
+++ servicemix/smx4/nmr/trunk/jbi/osgi/src/main/java/org/apache/servicemix/jbi/osgi/RegistryWrapper.java Tue Feb  8 16:32:54 2011
@@ -21,10 +21,10 @@ import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.nmr.api.Endpoint;
 import org.apache.servicemix.nmr.api.EndpointRegistry;
 import org.apache.servicemix.nmr.api.Reference;
@@ -44,7 +44,7 @@ import org.osgi.framework.ServiceRegistr
  */
 public class RegistryWrapper implements EndpointRegistry {
 
-    private static final Log LOG = LogFactory.getLog(RegistryWrapper.class);
+    private final Logger logger = LoggerFactory.getLogger(RegistryWrapper.class);
 
     private EndpointRegistry registry;
     private BundleContext bundleContext;
@@ -71,7 +71,7 @@ public class RegistryWrapper implements 
         if (reg != null) {
             reg.unregister();
         } else {
-            LOG.warn("Unregistration failed: the endpoint was not found in registry: " + endpoint + " (" + properties + ")");
+            logger.warn("Unregistration failed: the endpoint was not found in registry: " + endpoint + " (" + properties + ")");
             registry.unregister(endpoint, properties);
         }
     }

Modified: servicemix/smx4/nmr/trunk/jbi/runtime/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/runtime/pom.xml?rev=1068468&r1=1068467&r2=1068468&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/runtime/pom.xml (original)
+++ servicemix/smx4/nmr/trunk/jbi/runtime/pom.xml Tue Feb  8 16:32:54 2011
@@ -48,8 +48,8 @@
             <artifactId>org.apache.servicemix.document</artifactId>
         </dependency>
         <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.servicemix.bundles</groupId>