cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject svn commit: r1408284 - in /cxf/dosgi/trunk: discovery/distributed/cxf-discovery/ discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/ discovery/local/ discovery/local/src/main/java/org/apache/cxf/dosgi/discovery/l...
Date Mon, 12 Nov 2012 13:46:46 GMT
Author: cschneider
Date: Mon Nov 12 13:46:43 2012
New Revision: 1408284

URL: http://svn.apache.org/viewvc?rev=1408284&view=rev
Log:
DOSGI-135 Switch logging API to slf4j

Added:
    cxf/dosgi/trunk/felix/profiles/resources/
      - copied from r1405725, cxf/dosgi/trunk/dsw/cxf-dsw/src/test/resources/
Modified:
    cxf/dosgi/trunk/discovery/distributed/cxf-discovery/pom.xml
    cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/EndpointListenerTrackerCustomizer.java
    cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/InterfaceMonitor.java
    cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/InterfaceMonitorManager.java
    cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/PublishingEndpointListener.java
    cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/PublishingEndpointListenerFactory.java
    cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/ZooKeeperDiscovery.java
    cxf/dosgi/trunk/discovery/local/pom.xml
    cxf/dosgi/trunk/discovery/local/src/main/java/org/apache/cxf/dosgi/discovery/local/LocalDiscoveryUtils.java
    cxf/dosgi/trunk/discovery/local/src/main/java/org/apache/cxf/dosgi/discovery/local/internal/Activator.java
    cxf/dosgi/trunk/discovery/local/src/main/java/org/apache/cxf/dosgi/discovery/local/internal/LocalDiscovery.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/decorator/ServiceDecoratorImpl.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/SecurityDelegatingHttpContext.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ExportRegistrationImpl.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/decorator/ServiceDecoratorImplTest.java
    cxf/dosgi/trunk/dsw/cxf-topology-manager/pom.xml
    cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/Activator.java
    cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/exporter/EndpointListenerNotifier.java
    cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/exporter/TopologyManagerExport.java
    cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/importer/EndpointListenerManager.java
    cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/importer/ListenerHookImpl.java
    cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/importer/TopologyManagerImport.java

Modified: cxf/dosgi/trunk/discovery/distributed/cxf-discovery/pom.xml
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/distributed/cxf-discovery/pom.xml?rev=1408284&r1=1408283&r2=1408284&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/distributed/cxf-discovery/pom.xml (original)
+++ cxf/dosgi/trunk/discovery/distributed/cxf-discovery/pom.xml Mon Nov 12 13:46:43 2012
@@ -1,23 +1,16 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements. See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership. The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License. You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied. See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
+    <!-- Licensed to the Apache Software Foundation (ASF) under one or more 
+        contributor license agreements. See the NOTICE file distributed with this 
+        work for additional information regarding copyright ownership. The ASF licenses 
+        this file to you under the Apache License, Version 2.0 (the "License"); you 
+        may not use this file except in compliance with the License. You may obtain 
+        a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless 
+        required by applicable law or agreed to in writing, software distributed 
+        under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 
+        OR CONDITIONS OF ANY KIND, either express or implied. See the License for 
+        the specific language governing permissions and limitations under the License. -->
 
     <modelVersion>4.0.0</modelVersion>
     <artifactId>cxf-dosgi-ri-discovery-distributed</artifactId>
@@ -34,7 +27,7 @@
     <properties>
         <topDirectoryLocation>../../..</topDirectoryLocation>
     </properties>
-    
+
     <dependencies>
         <dependency>
             <groupId>org.apache.felix</groupId>
@@ -60,20 +53,20 @@
             <version>${zookeeper.version}</version>
             <exclusions>
                 <exclusion>
-                   <groupId>com.sun.jdmk</groupId>
-                   <artifactId>jmxtools</artifactId> 
+                    <groupId>com.sun.jdmk</groupId>
+                    <artifactId>jmxtools</artifactId>
                 </exclusion>
                 <exclusion>
-                   <groupId>com.sun.jmx</groupId>
-                   <artifactId>jmxri</artifactId> 
+                    <groupId>com.sun.jmx</groupId>
+                    <artifactId>jmxri</artifactId>
                 </exclusion>
                 <exclusion>
-                   <groupId>log4j</groupId>
-                   <artifactId>log4j</artifactId> 
+                    <groupId>log4j</groupId>
+                    <artifactId>log4j</artifactId>
                 </exclusion>
             </exclusions>
         </dependency>
-        
+
         <dependency>
             <groupId>org.apache.cxf.dosgi</groupId>
             <artifactId>cxf-dosgi-ri-discovery-local</artifactId>
@@ -81,25 +74,30 @@
             <scope>provided</scope>
         </dependency>
 
-        <!-- This is a zookeeper dependency that we apparently have to list here -->
-        <dependency> 
-            <groupId>org.apache.log4j</groupId> 
-            <artifactId>com.springsource.org.apache.log4j</artifactId> 
+        <!-- This is a zookeeper dependency that we apparently have to list 
+            here -->
+        <dependency>
+            <groupId>org.apache.log4j</groupId>
+            <artifactId>com.springsource.org.apache.log4j</artifactId>
             <version>${log4j.version}</version>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
 
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <scope>test</scope>
-        </dependency>  
+        </dependency>
         <dependency>
             <groupId>org.easymock</groupId>
             <artifactId>easymockclassextension</artifactId>
             <scope>test</scope>
-        </dependency> 
-    </dependencies> 
+        </dependency>
+    </dependencies>
 
     <build>
         <plugins>
@@ -108,8 +106,11 @@
                 <artifactId>maven-bundle-plugin</artifactId>
                 <configuration>
                     <instructions>
-                        <Bundle-Name>CXF Zookeeper-based Discovery Service Bundle</Bundle-Name>
-                        <Bundle-Description>This bundle contains an implementation of the Distributed OSGi Discovery Service using Zookeeper</Bundle-Description>
+                        <Bundle-Name>CXF Zookeeper-based Discovery
+                            Service Bundle</Bundle-Name>
+                        <Bundle-Description>This bundle contains an
+                            implementation of the Distributed OSGi
+                            Discovery Service using Zookeeper</Bundle-Description>
                         <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                         <Bundle-Vendor>The Apache Software Foundation</Bundle-Vendor>
                         <Bundle-Activator>org.apache.cxf.dosgi.discovery.zookeeper.Activator</Bundle-Activator>
@@ -126,7 +127,7 @@
                         </Private-Package>
                     </instructions>
                 </configuration>
-            </plugin> 
+            </plugin>
         </plugins>
-    </build>    
+    </build>
 </project>

Modified: cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/EndpointListenerTrackerCustomizer.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/EndpointListenerTrackerCustomizer.java?rev=1408284&r1=1408283&r2=1408284&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/EndpointListenerTrackerCustomizer.java (original)
+++ cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/EndpointListenerTrackerCustomizer.java Mon Nov 12 13:46:43 2012
@@ -18,21 +18,21 @@
  */
 package org.apache.cxf.dosgi.discovery.zookeeper;
 
-import java.util.logging.Level;
-import java.util.logging.Logger;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
 import org.osgi.util.tracker.ServiceTrackerCustomizer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Tracks interest in EndpointListeners. Delegates to InterfaceMonitorManager to manage 
  * interest in the scopes of each EndpointListener
  */
 public class EndpointListenerTrackerCustomizer implements ServiceTrackerCustomizer {
-    private static final Logger LOG = Logger.getLogger(EndpointListenerTrackerCustomizer.class.getName());
+    private static final Logger LOG = LoggerFactory.getLogger(EndpointListenerTrackerCustomizer.class);
     private static final Pattern OBJECTCLASS_PATTERN = Pattern.compile(".*\\(objectClass=([^)]+)\\).*");
 
     private InterfaceMonitorManager imManager;
@@ -52,21 +52,21 @@ public class EndpointListenerTrackerCust
 
     private void handleEndpointListener(ServiceReference sref) {
         if (isOurOwnEndpointListener(sref)) {
-            LOG.finest("Skipping our own endpointListener");
+            LOG.debug("Skipping our own endpointListener");
             return;
         }
 
-        if (LOG.isLoggable(Level.FINEST)) {
+        if (LOG.isDebugEnabled()) {
             for (String key : sref.getPropertyKeys()) {
-                LOG.finest("modifiedService: property: " + key + " => " + sref.getProperty(key));
+                LOG.debug("modifiedService: property: " + key + " => " + sref.getProperty(key));
             }
         }
         
         String[] scopes = Util.getScopes(sref);
         for (String scope : scopes) {
             String objClass = getObjectClass(scope);
-            if (LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Adding interest in scope: " + scope + " objectClass: " + objClass);
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("Adding interest in scope: " + scope + " objectClass: " + objClass);
             }
             imManager.addInterest(sref, scope, objClass);
         }

Modified: cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/InterfaceMonitor.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/InterfaceMonitor.java?rev=1408284&r1=1408283&r2=1408284&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/InterfaceMonitor.java (original)
+++ cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/InterfaceMonitor.java Mon Nov 12 13:46:43 2012
@@ -1,29 +1,27 @@
 /** 
-  * Licensed to the Apache Software Foundation (ASF) under one 
-  * or more contributor license agreements. See the NOTICE file 
-  * distributed with this work for additional information 
-  * regarding copyright ownership. The ASF licenses this file 
-  * to you under the Apache License, Version 2.0 (the 
-  * "License"); you may not use this file except in compliance 
-  * with the License. You may obtain a copy of the License at 
-  * 
-  * http://www.apache.org/licenses/LICENSE-2.0 
-  * 
-  * Unless required by applicable law or agreed to in writing, 
-  * software distributed under the License is distributed on an 
-  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
-  * KIND, either express or implied. See the License for the 
-  * specific language governing permissions and limitations 
-  * under the License. 
-  */
+ * Licensed to the Apache Software Foundation (ASF) under one 
+ * or more contributor license agreements. See the NOTICE file 
+ * distributed with this work for additional information 
+ * regarding copyright ownership. The ASF licenses this file 
+ * to you under the Apache License, Version 2.0 (the 
+ * "License"); you may not use this file except in compliance 
+ * with the License. You may obtain a copy of the License at 
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0 
+ * 
+ * Unless required by applicable law or agreed to in writing, 
+ * software distributed under the License is distributed on an 
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
+ * KIND, either express or implied. See the License for the 
+ * specific language governing permissions and limitations 
+ * under the License. 
+ */
 package org.apache.cxf.dosgi.discovery.zookeeper;
 
 import java.io.ByteArrayInputStream;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 
 import org.apache.cxf.dosgi.discovery.local.LocalDiscoveryUtils;
 import org.apache.zookeeper.AsyncCallback.StatCallback;
@@ -37,34 +35,39 @@ import org.jdom.Element;
 import org.osgi.framework.BundleContext;
 import org.osgi.service.remoteserviceadmin.EndpointDescription;
 import org.osgi.service.remoteserviceadmin.EndpointListener;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class InterfaceMonitor implements Watcher, StatCallback {
-    private static final Logger LOG = Logger.getLogger(InterfaceMonitor.class.getName());
+    private static final Logger LOG = LoggerFactory.getLogger(InterfaceMonitor.class);
 
     private final String znode;
     private final ZooKeeper zookeeper;
     private final EndpointListener epListener;
     private final boolean recursive;
     private boolean closed = false;
-    
+
     // This map is *only* accessed in the change() method
     private Map<String, EndpointDescription> nodes = new HashMap<String, EndpointDescription>();
 
     public InterfaceMonitor(ZooKeeper zk, String intf, EndpointListener epListener, String scope, BundleContext bctx) {
-        LOG.fine("Creating new InterfaceMonitor for scope [" + scope + "] and objectClass [" + intf + "] ");
         this.zookeeper = zk;
         this.znode = Util.getZooKeeperPath(intf);
         this.recursive = (intf == null || "".equals(intf));
         this.epListener = epListener;
-        LOG.fine("InterfaceDataMonitorListenerImpl is recursive: " + recursive);
+        if (LOG.isDebugEnabled()) {
+            String recursiveSt = recursive ? "recursive" : "";
+            LOG.debug("Creating new InterfaceMonitor " + recursiveSt + "for scope [" + scope
+                + "] and objectClass [" + intf + "] ");
+        }
     }
-    
+
     public void start() {
         watch();
     }
-    
+
     private void watch() {
-        LOG.finest("registering a zookeeper.exists(" + znode+") callback");
+        LOG.debug("registering a zookeeper.exists({}) callback", znode);
         zookeeper.exists(znode, this, this, null);
     }
 
@@ -72,18 +75,17 @@ public class InterfaceMonitor implements
      * Zookeeper watcher
      */
     public void process(WatchedEvent event) {
-        LOG.finer("ZooKeeper watcher callback " + event);
+        LOG.debug("ZooKeeper watcher callback for event {}", event);
         processDelta();
     }
-    
+
     /**
-     * Zookeeper StatCallback 
+     * Zookeeper StatCallback
      */
     @SuppressWarnings("deprecation")
     public void processResult(int rc, String path, Object ctx, Stat stat) {
+        LOG.debug("ZooKeeper callback on node: {} code: {}", znode, rc);
 
-        LOG.finer("ZooKeeper callback on node: " + znode + "   code: " + rc );
-        
         switch (rc) {
         case Code.Ok:
         case Code.NoNode:
@@ -93,12 +95,12 @@ public class InterfaceMonitor implements
         case Code.NoAuth:
         case Code.ConnectionLoss:
             return;
-        
+
         default:
             watch();
             return;
         }
-        
+
         processDelta();
     }
 
@@ -106,21 +108,21 @@ public class InterfaceMonitor implements
         if (closed) {
             return;
         }
-        
-        if (zookeeper.getState() != ZooKeeper.States.CONNECTED){
+
+        if (zookeeper.getState() != ZooKeeper.States.CONNECTED) {
             LOG.info("zookeeper connection was already closed! Not processing changed event.");
             return;
         }
-        
+
         try {
             if (zookeeper.exists(znode, false) != null) {
                 zookeeper.getChildren(znode, this);
                 change();
-            }else{
-                LOG.fine(znode+" doesn't exist -> not processing any changes");
+            } else {
+                LOG.debug("znode {} doesn't exist -> not processing any changes", znode);
             }
         } catch (Exception ke) {
-            LOG.log(Level.SEVERE, "Error getting ZooKeeper data.", ke);
+            LOG.error("Error getting ZooKeeper data.", ke);
         }
     }
 
@@ -130,17 +132,16 @@ public class InterfaceMonitor implements
         }
         nodes.clear();
     }
-    
+
     public synchronized void change() {
-        LOG.info("Zookeeper callback on node: " + znode);
+        LOG.info("Zookeeper callback on node: {}", znode);
 
         Map<String, EndpointDescription> newNodes = new HashMap<String, EndpointDescription>();
         Map<String, EndpointDescription> prevNodes = nodes;
         processChildren(znode, newNodes, prevNodes);
 
         // whatever is left in prevNodes now has been removed from Discovery
-        LOG.fine("processChildren done. Nodes that are missing now and need to be removed: "
-                 + prevNodes.values());
+        LOG.debug("processChildren done. Nodes that are missing now and need to be removed: {}", prevNodes.values());
         for (EndpointDescription epd : prevNodes.values()) {
             epListener.endpointRemoved(epd, null);
         }
@@ -148,16 +149,18 @@ public class InterfaceMonitor implements
     }
 
     /**
-     * iterates through all child nodes of the given node and tries to find endpoints. If the recursive flag
-     * is set it also traverses into the child nodes.
+     * iterates through all child nodes of the given node and tries to find
+     * endpoints. If the recursive flag is set it also traverses into the child
+     * nodes.
      * 
-     * @return true if an endpoint was found and if the node therefore needs to be monitored for changes
+     * @return true if an endpoint was found and if the node therefore needs to
+     *         be monitored for changes
      */
     private boolean processChildren(String znode, Map<String, EndpointDescription> newNodes,
-                                    Map<String, EndpointDescription> prevNodes) {
+            Map<String, EndpointDescription> prevNodes) {
         List<String> children;
         try {
-            LOG.fine("Processing the children of " + znode);
+            LOG.debug("Processing the children of {}", znode);
             children = zookeeper.getChildren(znode, false);
 
             boolean foundANode = false;
@@ -167,11 +170,13 @@ public class InterfaceMonitor implements
                 if (epd != null) {
                     EndpointDescription prevEpd = prevNodes.get(child);
                     LOG.info("found new node " + znode + "/[" + child + "]   ( []->child )  props: "
-                             + epd.getProperties().values());
+                            + epd.getProperties().values());
                     newNodes.put(child, epd);
                     prevNodes.remove(child);
                     foundANode = true;
-                    LOG.finest("Properties: " + epd.getProperties());
+                    if (LOG.isDebugEnabled()) {
+                        LOG.debug("Properties: " + epd.getProperties());
+                    }
                     if (prevEpd == null) {
                         // This guy is new
                         epListener.endpointAdded(epd, null);
@@ -188,19 +193,20 @@ public class InterfaceMonitor implements
 
             return foundANode;
         } catch (KeeperException e) {
-            LOG.log(Level.SEVERE, "Problem processing Zookeeper node: " + e.getMessage(), e);
+            LOG.error("Problem processing Zookeeper node", e);
         } catch (InterruptedException e) {
-            LOG.log(Level.SEVERE, "Problem processing Zookeeper node: " + e.getMessage(), e);
+            LOG.error("Problem processing Zookeeper node", e);
         }
         return false;
     }
 
     /**
-     * Scan the node data for Endpoint information and publish it to the related service listeners
+     * Scan the node data for Endpoint information and publish it to the related
+     * service listeners
      * 
-     * @param node 
+     * @param node
      * @return endpoint found in the node or null if no endpoint was found
-     */ 
+     */
     private EndpointDescription getEndpointDescriptionFromNode(String node) {
         try {
             Stat s = zookeeper.exists(node, false);
@@ -208,16 +214,16 @@ public class InterfaceMonitor implements
                 return null;
             }
             byte[] data = zookeeper.getData(node, false, null);
-            LOG.fine("Child: " + node);
+            LOG.debug("Child: {}", node);
 
             List<Element> elements = LocalDiscoveryUtils.getElements(new ByteArrayInputStream(data));
             if (elements.size() > 0) {
                 return LocalDiscoveryUtils.getEndpointDescription(elements.get(0));
             } else {
-                LOG.warning("No Discovery information found for node: " + node);
+                LOG.warn("No Discovery information found for node: {}", node);
             }
         } catch (Exception e) {
-            LOG.log(Level.SEVERE, "Problem processing Zookeeper callback: " + e.getMessage(), e);
+            LOG.error("Problem processing Zookeeper callback", e);
         }
         return null;
     }

Modified: cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/InterfaceMonitorManager.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/InterfaceMonitorManager.java?rev=1408284&r1=1408283&r2=1408284&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/InterfaceMonitorManager.java (original)
+++ cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/InterfaceMonitorManager.java Mon Nov 12 13:46:43 2012
@@ -7,8 +7,6 @@ import java.util.Hashtable;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 
 import org.apache.zookeeper.ZooKeeper;
 import org.osgi.framework.BundleContext;
@@ -18,6 +16,8 @@ import org.osgi.framework.InvalidSyntaxE
 import org.osgi.framework.ServiceReference;
 import org.osgi.service.remoteserviceadmin.EndpointDescription;
 import org.osgi.service.remoteserviceadmin.EndpointListener;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Manages the EndpointListeners and the scopes they are interested in.
@@ -26,7 +26,7 @@ import org.osgi.service.remoteserviceadm
  * These events are then forwarded to all interested EndpointListeners
  */
 public class InterfaceMonitorManager {
-    private static final Logger LOG = Logger.getLogger(InterfaceMonitorManager.class.getName());
+    private static final Logger LOG = LoggerFactory.getLogger(InterfaceMonitorManager.class);
     
     private final ZooKeeper zooKeeper;
     private final Map<ServiceReference, List<String> /* scopes of the epl */> handledEndpointlisteners = new HashMap<ServiceReference, List<String>>();
@@ -135,9 +135,9 @@ public class InterfaceMonitorManager {
             EndpointListener epl = (EndpointListener) service;
             String[] scopes = Util.getScopes(sref);
             for (final String currentScope : scopes) {
-                LOG.fine("matching " + epd + " against " + currentScope);
+                LOG.debug("matching {} against {}", epd, currentScope);
                 if (matches(currentScope, epd)) {
-                    LOG.fine("Matched " + epd + "against " + currentScope);
+                    LOG.debug("Matched {} against {}", epd, currentScope);
                     if (isAdded) {
                         LOG.info("calling EndpointListener.endpointAdded: " + epl + "from bundle "
                                 + sref.getBundle().getSymbolicName() + " for endpoint: " + epd);
@@ -159,7 +159,7 @@ public class InterfaceMonitorManager {
             Dictionary<String, Object> dict = mapToDictionary(epd.getProperties());
             return f.match(dict);
         } catch (InvalidSyntaxException e) {
-            LOG.log(Level.SEVERE, "Currentscope [" + scope + "] resulted in" + " a bad filter!", e);
+            LOG.error("Currentscope [" + scope + "] resulted in" + " a bad filter!", e);
             return false;
         }
     }

Modified: cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/PublishingEndpointListener.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/PublishingEndpointListener.java?rev=1408284&r1=1408283&r2=1408284&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/PublishingEndpointListener.java (original)
+++ cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/PublishingEndpointListener.java Mon Nov 12 13:46:43 2012
@@ -28,8 +28,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 
 import org.apache.cxf.dosgi.discovery.local.LocalDiscoveryUtils;
 import org.apache.zookeeper.CreateMode;
@@ -41,12 +39,14 @@ import org.osgi.framework.ServiceReferen
 import org.osgi.service.remoteserviceadmin.EndpointDescription;
 import org.osgi.service.remoteserviceadmin.EndpointListener;
 import org.osgi.util.tracker.ServiceTracker;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Listens for local Endpoints and publishes them to Zookeeper
  */
 public class PublishingEndpointListener implements EndpointListener {
-    private final Logger LOG = Logger.getLogger(PublishingEndpointListener.class.getName());
+    private final Logger LOG = LoggerFactory.getLogger(PublishingEndpointListener.class);
 
     private final ZooKeeper zookeeper;
     private final List<DiscoveryPlugin> discoveryPlugins = new CopyOnWriteArrayList<DiscoveryPlugin>();
@@ -104,13 +104,13 @@ public class PublishingEndpointListener 
                     ensurePath(path, zookeeper);
 
                     String fullPath = path + '/' + endpointKey;
-                    LOG.fine("Creating ZooKeeper node: " + fullPath);
+                    LOG.debug("Creating ZooKeeper node: {}", fullPath);
                     zookeeper.create(fullPath, getData(props), Ids.OPEN_ACL_UNSAFE, CreateMode.EPHEMERAL);
                 }
 
                 endpoints.add(endpoint);
             } catch (Exception ex) {
-                LOG.log(Level.SEVERE, "Exception while processing the addition of a ServicePublication.", ex);
+                LOG.error("Exception while processing the addition of a ServicePublication.", ex);
             }
         }
 
@@ -132,7 +132,7 @@ public class PublishingEndpointListener 
 
                 endpoints.remove(endpoint);
             } catch (Exception ex) {
-                LOG.log(Level.SEVERE, "Exception while processing the removal of a ServicePublication.", ex);
+                LOG.error("Exception while processing the removal of a ServicePublication.", ex);
             }
         }
 
@@ -146,7 +146,7 @@ public class PublishingEndpointListener 
         for (String name : interfaces) {
             String path = Util.getZooKeeperPath(name);
             String fullPath = path + '/' + endpointKey;
-            LOG.fine("Removing ZooKeeper node: " + fullPath);
+            LOG.debug("Removing ZooKeeper node: {}", fullPath);
             zookeeper.delete(fullPath, -1);
         }
     }
@@ -186,14 +186,13 @@ public class PublishingEndpointListener 
     }
 
     public void close() {
-        LOG.fine("removing all service publications");
+        LOG.debug("removing all service publications");
         synchronized (endpoints) {
             for (EndpointDescription ed : endpoints) {
                 try {
                     removeEndpoint(ed);
                 } catch (Exception ex) {
-                    LOG.log(Level.SEVERE, "Exception while processing the removal of a ServicePublication.",
-                            ex);
+                    LOG.error("Exception while processing the removal of a ServicePublication.", ex);
                 }
             }
             endpoints.clear();

Modified: cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/PublishingEndpointListenerFactory.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/PublishingEndpointListenerFactory.java?rev=1408284&r1=1408283&r2=1408284&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/PublishingEndpointListenerFactory.java (original)
+++ cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/PublishingEndpointListenerFactory.java Mon Nov 12 13:46:43 2012
@@ -21,7 +21,6 @@ package org.apache.cxf.dosgi.discovery.z
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Properties;
-import java.util.logging.Logger;
 
 import org.apache.zookeeper.ZooKeeper;
 import org.osgi.framework.Bundle;
@@ -31,13 +30,15 @@ import org.osgi.framework.ServiceFactory
 import org.osgi.framework.ServiceRegistration;
 import org.osgi.service.remoteserviceadmin.EndpointListener;
 import org.osgi.service.remoteserviceadmin.RemoteConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Creates local Endpointlisteners that publish to Zookeeper 
  */
 public class PublishingEndpointListenerFactory implements ServiceFactory {
     public static final String DISCOVERY_ZOOKEEPER_ID = "org.apache.cxf.dosgi.discovery.zookeeper";
-    private static final Logger LOG = Logger.getLogger(PublishingEndpointListenerFactory.class.getName());
+    private static final Logger LOG = LoggerFactory.getLogger(PublishingEndpointListenerFactory.class);
 
     private BundleContext bctx;
     private ZooKeeper zookeeper;
@@ -50,7 +51,7 @@ public class PublishingEndpointListenerF
     }
 
     public Object getService(Bundle b, ServiceRegistration sr) {
-        LOG.fine("new EndpointListener from factory");
+        LOG.debug("new EndpointListener from factory");
         synchronized (listeners) {
             PublishingEndpointListener epl = new PublishingEndpointListener(zookeeper, bctx);
             listeners.add(epl);
@@ -59,7 +60,7 @@ public class PublishingEndpointListenerF
     }
 
     public void ungetService(Bundle b, ServiceRegistration sr, Object s) {
-        LOG.fine("remove EndpointListener");
+        LOG.debug("remove EndpointListener");
         synchronized (listeners) {
             if (listeners.contains(s)) {
                 PublishingEndpointListener epl = (PublishingEndpointListener)s;

Modified: cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/ZooKeeperDiscovery.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/ZooKeeperDiscovery.java?rev=1408284&r1=1408283&r2=1408284&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/ZooKeeperDiscovery.java (original)
+++ cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/ZooKeeperDiscovery.java Mon Nov 12 13:46:43 2012
@@ -20,8 +20,6 @@ package org.apache.cxf.dosgi.discovery.z
 
 import java.io.IOException;
 import java.util.Dictionary;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 
 import org.apache.zookeeper.WatchedEvent;
 import org.apache.zookeeper.Watcher;
@@ -32,10 +30,12 @@ import org.osgi.service.cm.Configuration
 import org.osgi.service.cm.ManagedService;
 import org.osgi.service.remoteserviceadmin.EndpointListener;
 import org.osgi.util.tracker.ServiceTracker;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class ZooKeeperDiscovery implements Watcher, ManagedService {
 
-    private static final Logger LOG = Logger.getLogger(ZooKeeperDiscovery.class.getName());
+    private static final Logger LOG = LoggerFactory.getLogger(ZooKeeperDiscovery.class);
 
     private final BundleContext bctx;
 
@@ -56,8 +56,8 @@ public class ZooKeeperDiscovery implemen
 
     @SuppressWarnings("rawtypes")
     public synchronized void updated(Dictionary configuration) throws ConfigurationException {
-        if (LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Received configuration update for Zookeeper Discovery: " + configuration);
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Received configuration update for Zookeeper Discovery: " + configuration);
         }
 
         synchronized (this) {
@@ -71,7 +71,7 @@ public class ZooKeeperDiscovery implemen
         try {
             zooKeeper = createZooKeeper(configuration);
         } catch (IOException e) {
-            LOG.log(Level.SEVERE, "Failed to start the Zookeeper Discovery component.", e);
+            LOG.error("Failed to start the Zookeeper Discovery component.", e);
         }
     }
 
@@ -98,7 +98,7 @@ public class ZooKeeperDiscovery implemen
             try {
                 zooKeeper.close();
             } catch (InterruptedException e) {
-                LOG.log(Level.SEVERE, "Error closing zookeeper", e);
+                LOG.error("Error closing zookeeper", e);
             }
         }
     }
@@ -121,7 +121,7 @@ public class ZooKeeperDiscovery implemen
             rv = val.toString();
         }
 
-        LOG.fine("Reading Config Admin property: " + key + " value returned: " + rv);
+        LOG.debug("Reading Config Admin property: {} value returned: {}", key, rv);
         return rv;
     }
 
@@ -138,7 +138,7 @@ public class ZooKeeperDiscovery implemen
             try {
                 zooKeeper = createZooKeeper(curConfiguration);
             } catch (IOException e) {
-                LOG.log(Level.SEVERE, "Failed to start the Zookeeper Discovery component.", e);
+                LOG.error("Failed to start the Zookeeper Discovery component.", e);
             }
         }
     }

Modified: cxf/dosgi/trunk/discovery/local/pom.xml
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/local/pom.xml?rev=1408284&r1=1408283&r2=1408284&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/local/pom.xml (original)
+++ cxf/dosgi/trunk/discovery/local/pom.xml Mon Nov 12 13:46:43 2012
@@ -1,23 +1,16 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements. See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership. The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License. You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied. See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
+    <!-- Licensed to the Apache Software Foundation (ASF) under one or more 
+        contributor license agreements. See the NOTICE file distributed with this 
+        work for additional information regarding copyright ownership. The ASF licenses 
+        this file to you under the Apache License, Version 2.0 (the "License"); you 
+        may not use this file except in compliance with the License. You may obtain 
+        a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless 
+        required by applicable law or agreed to in writing, software distributed 
+        under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 
+        OR CONDITIONS OF ANY KIND, either express or implied. See the License for 
+        the specific language governing permissions and limitations under the License. -->
 
     <modelVersion>4.0.0</modelVersion>
     <artifactId>cxf-dosgi-ri-discovery-local</artifactId>
@@ -36,7 +29,7 @@
     </properties>
 
     <dependencies>
-        <dependency> 
+        <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.framework</artifactId>
             <version>${felix.version}</version>
@@ -46,7 +39,7 @@
                     <artifactId>org.osgi.foundation</artifactId>
                 </exclusion>
             </exclusions>
-        </dependency> 
+        </dependency>
 
         <dependency>
             <groupId>org.osgi</groupId>
@@ -54,23 +47,27 @@
             <version>${osgi.version}</version>
         </dependency>
 
-        <dependency>  
-            <groupId>org.jdom</groupId>  
-            <artifactId>com.springsource.org.jdom</artifactId>  
-            <version>1.1.0</version> 
+        <dependency>
+            <groupId>org.jdom</groupId>
+            <artifactId>com.springsource.org.jdom</artifactId>
+            <version>1.1.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
         </dependency>
 
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <scope>test</scope>
-        </dependency>  
+        </dependency>
         <dependency>
             <groupId>org.easymock</groupId>
             <artifactId>easymockclassextension</artifactId>
             <scope>test</scope>
         </dependency>
-    </dependencies> 
+    </dependencies>
 
     <build>
         <plugins>
@@ -80,7 +77,9 @@
                 <configuration>
                     <instructions>
                         <Bundle-Name>CXF Local Discovery Service Bundle</Bundle-Name>
-                        <Bundle-Description>This bundle contains the implementation required by the CXF Local Discovery Service Bundle</Bundle-Description>
+                        <Bundle-Description>This bundle contains the
+                            implementation required by the CXF Local
+                            Discovery Service Bundle</Bundle-Description>
                         <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                         <Bundle-Activator>org.apache.cxf.dosgi.discovery.local.internal.Activator</Bundle-Activator>
                         <Import-Package>
@@ -90,10 +89,10 @@
                         <Private-Package>org.apache.cxf.dosgi.discovery.local.internal</Private-Package>
                         <Export-Package>
                             org.apache.cxf.dosgi.discovery.local
-                        </Export-Package> 
+                        </Export-Package>
                     </instructions>
                 </configuration>
-            </plugin> 
+            </plugin>
         </plugins>
-    </build>    
+    </build>
 </project>

Modified: cxf/dosgi/trunk/discovery/local/src/main/java/org/apache/cxf/dosgi/discovery/local/LocalDiscoveryUtils.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/local/src/main/java/org/apache/cxf/dosgi/discovery/local/LocalDiscoveryUtils.java?rev=1408284&r1=1408283&r2=1408284&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/local/src/main/java/org/apache/cxf/dosgi/discovery/local/LocalDiscoveryUtils.java (original)
+++ cxf/dosgi/trunk/discovery/local/src/main/java/org/apache/cxf/dosgi/discovery/local/LocalDiscoveryUtils.java Mon Nov 12 13:46:43 2012
@@ -34,8 +34,6 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 
 import org.jdom.Document;
 import org.jdom.Element;
@@ -49,11 +47,12 @@ import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceReference;
 import org.osgi.service.remoteserviceadmin.EndpointDescription;
 import org.osgi.service.remoteserviceadmin.RemoteConstants;
+import org.slf4j.LoggerFactory;
 
 
 public final class LocalDiscoveryUtils {
-    private static final Logger LOG =
-        Logger.getLogger(LocalDiscoveryUtils.class.getName());
+    private static final org.slf4j.Logger LOG =
+        LoggerFactory.getLogger(LocalDiscoveryUtils.class);
 
     private static final String REMOTE_SERVICES_HEADER_NAME = "Remote-Service";
     private static final String REMOTE_SERVICES_DIRECTORY =
@@ -214,7 +213,7 @@ public final class LocalDiscoveryUtils {
             map.put(name, array);
             return true;
         } catch (Exception e) {
-            LOG.log(Level.WARNING, "Could not create array for Endpoint Description", e);
+            LOG.warn("Could not create array for Endpoint Description", e);
             return false;
         }
     }
@@ -270,7 +269,7 @@ public final class LocalDiscoveryUtils {
 
         String type = getTypeName(prop);
         if (!"String".equals(type)) {
-            LOG.warning("Embedded XML must be of type String, found: " + type);
+            LOG.warn("Embedded XML must be of type String, found: " + type);
             return null;
         }
 
@@ -331,7 +330,7 @@ public final class LocalDiscoveryUtils {
                 return ctor.newInstance(value);
             }
         } catch (Exception e) {
-            LOG.warning("Could not create Endpoint Property of type " + type + " and value " + value);
+            LOG.warn("Could not create Endpoint Property of type " + type + " and value " + value);
             return null;
         }
     }
@@ -375,7 +374,7 @@ public final class LocalDiscoveryUtils {
             try {
                 elements.addAll(getElements(resourceURL.openStream()));
             } catch (Exception ex) {
-                LOG.log(Level.WARNING, "Problem parsing: " + resourceURL, ex);
+                LOG.warn("Problem parsing: " + resourceURL, ex);
             }
         }
         return elements;

Modified: cxf/dosgi/trunk/discovery/local/src/main/java/org/apache/cxf/dosgi/discovery/local/internal/Activator.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/local/src/main/java/org/apache/cxf/dosgi/discovery/local/internal/Activator.java?rev=1408284&r1=1408283&r2=1408284&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/local/src/main/java/org/apache/cxf/dosgi/discovery/local/internal/Activator.java (original)
+++ cxf/dosgi/trunk/discovery/local/src/main/java/org/apache/cxf/dosgi/discovery/local/internal/Activator.java Mon Nov 12 13:46:43 2012
@@ -18,13 +18,14 @@
   */
 package org.apache.cxf.dosgi.discovery.local.internal;
 
-import java.util.logging.Logger;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class Activator implements BundleActivator {
 
-    private static final Logger LOG = Logger.getLogger(Activator.class.getName());
+    private static final Logger LOG = LoggerFactory.getLogger(Activator.class);
 
     LocalDiscovery localDiscovery;
     

Modified: cxf/dosgi/trunk/discovery/local/src/main/java/org/apache/cxf/dosgi/discovery/local/internal/LocalDiscovery.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/local/src/main/java/org/apache/cxf/dosgi/discovery/local/internal/LocalDiscovery.java?rev=1408284&r1=1408283&r2=1408284&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/local/src/main/java/org/apache/cxf/dosgi/discovery/local/internal/LocalDiscovery.java (original)
+++ cxf/dosgi/trunk/discovery/local/src/main/java/org/apache/cxf/dosgi/discovery/local/internal/LocalDiscovery.java Mon Nov 12 13:46:43 2012
@@ -28,7 +28,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.concurrent.ConcurrentHashMap;
-import java.util.logging.Logger;
 
 import org.apache.cxf.dosgi.discovery.local.LocalDiscoveryUtils;
 import org.osgi.framework.Bundle;
@@ -40,9 +39,11 @@ import org.osgi.framework.ServiceReferen
 import org.osgi.service.remoteserviceadmin.EndpointDescription;
 import org.osgi.service.remoteserviceadmin.EndpointListener;
 import org.osgi.util.tracker.ServiceTracker;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class LocalDiscovery implements BundleListener {   
-    private static final Logger LOG = Logger.getLogger(LocalDiscovery.class.getName());
+    private static final Logger LOG = LoggerFactory.getLogger(LocalDiscovery.class);
     
     // this is effectively a set which allows for multiple service descriptions with the
     // same interface name but different properties and takes care of itself with respect to concurrency 
@@ -251,7 +252,7 @@ public class LocalDiscovery implements B
         try {
             return bundleContext.createFilter(filterValue); 
         } catch (Exception ex) {
-            LOG.severe("Problem creating a Filter from " + filterValue); 
+            LOG.error("Problem creating a Filter from " + filterValue, ex); 
         }
         return null;
     }    

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/decorator/ServiceDecoratorImpl.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/decorator/ServiceDecoratorImpl.java?rev=1408284&r1=1408283&r2=1408284&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/decorator/ServiceDecoratorImpl.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/decorator/ServiceDecoratorImpl.java Mon Nov 12 13:46:43 2012
@@ -26,10 +26,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 
-import org.apache.cxf.common.logging.LogUtils;
 import org.jdom.Document;
 import org.jdom.Element;
 import org.jdom.Namespace;
@@ -39,9 +36,11 @@ import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleEvent;
 import org.osgi.framework.BundleListener;
 import org.osgi.framework.ServiceReference;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class ServiceDecoratorImpl implements ServiceDecorator {
-    private static final Logger LOG = LogUtils.getL7dLogger(ServiceDecoratorImpl.class);
+    private static final Logger LOG = LoggerFactory.getLogger(ServiceDecoratorImpl.class);
     
     private final BundleContext bundleContext;
     private final BundleListenerImpl bundleListener;
@@ -95,7 +94,7 @@ public class ServiceDecoratorImpl implem
                 Namespace ns = Namespace.getNamespace("http://cxf.apache.org/xmlns/service-decoration/1.0.0");
                 elements.addAll(d.getRootElement().getChildren("service-decoration", ns));
             } catch (Exception ex) {
-                LOG.log(Level.WARNING, "Problem parsing: " + resourceURL, ex);
+                LOG.warn("Problem parsing: " + resourceURL, ex);
             }
         }
         return elements;

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/SecurityDelegatingHttpContext.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/SecurityDelegatingHttpContext.java?rev=1408284&r1=1408283&r2=1408284&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/SecurityDelegatingHttpContext.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/SecurityDelegatingHttpContext.java Mon Nov 12 13:46:43 2012
@@ -20,7 +20,6 @@ package org.apache.cxf.dosgi.dsw.handler
 
 import java.io.IOException;
 import java.net.URL;
-import java.util.logging.Logger;
 
 import javax.servlet.Filter;
 import javax.servlet.FilterChain;
@@ -30,11 +29,12 @@ import javax.servlet.ServletResponse;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.cxf.common.logging.LogUtils;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.InvalidSyntaxException;
 import org.osgi.framework.ServiceReference;
 import org.osgi.service.http.HttpContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * <p>
@@ -49,7 +49,7 @@ import org.osgi.service.http.HttpContext
  * </p>
  */
 public class SecurityDelegatingHttpContext implements HttpContext {
-  private static final Logger LOG = LogUtils.getL7dLogger(SecurityDelegatingHttpContext.class);
+  private static final Logger LOG = LoggerFactory.getLogger(SecurityDelegatingHttpContext.class);
   public static final String FILTER_PROP = "org.apache.cxf.httpservice.filter";
   public static final String FILTER_REQUIRED_PROP = "org.apache.cxf.httpservice.requirefilter";
   private static final String FILTER_FILTER = "(" + FILTER_PROP + "=*)";
@@ -77,7 +77,7 @@ public class SecurityDelegatingHttpConte
     try {
       refs = bundleContext.getServiceReferences(Filter.class.getName(), FILTER_FILTER);
     } catch (InvalidSyntaxException e) {
-      LOG.warning(e.getMessage());
+      LOG.warn(e.getMessage(), e);
       return false;
     }
     if (refs == null || refs.length == 0) {
@@ -91,7 +91,7 @@ public class SecurityDelegatingHttpConte
       new Chain(filters).doFilter(request, response);
       return !response.isCommitted();
     } catch (ServletException e) {
-      LOG.warning(e.getMessage());
+      LOG.warn(e.getMessage(), e);
       return false;
     }
   }
@@ -101,7 +101,7 @@ public class SecurityDelegatingHttpConte
  * A {@link FilterChain} composed of {@link Filter}s with the
  */
 class Chain implements FilterChain {
-  private static final Logger LOG = Logger.getLogger(Chain.class.getName());
+  private static final Logger LOG = LoggerFactory.getLogger(Chain.class);
 
   int current = 0;
   Filter[] filters;
@@ -113,7 +113,7 @@ class Chain implements FilterChain {
   public void doFilter(ServletRequest request, ServletResponse response) throws IOException, ServletException {
     if (current < filters.length && !response.isCommitted()) {
       Filter filter = filters[current++];
-      LOG.info("doFilter() on " + filter);
+      LOG.info("doFilter() on {}", filter);
       filter.doFilter(request, response, this);
     }
   }

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ExportRegistrationImpl.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ExportRegistrationImpl.java?rev=1408284&r1=1408283&r2=1408284&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ExportRegistrationImpl.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ExportRegistrationImpl.java Mon Nov 12 13:46:43 2012
@@ -56,7 +56,6 @@ public class ExportRegistrationImpl impl
 
     // provide a clone of the provided exp.Reg that is linked to this instance
     public ExportRegistrationImpl(ExportRegistrationImpl exportRegistration) {
-
         parent = exportRegistration;
         exportReference = new ExportReferenceImpl(parent.getExportReference());
         exception = parent.getException();

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/decorator/ServiceDecoratorImplTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/decorator/ServiceDecoratorImplTest.java?rev=1408284&r1=1408283&r2=1408284&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/decorator/ServiceDecoratorImplTest.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/decorator/ServiceDecoratorImplTest.java Mon Nov 12 13:46:43 2012
@@ -66,9 +66,10 @@ public class ServiceDecoratorImplTest ex
     }
     
     public void testGetDecoratorElements() {
+        URL sdURL = getClass().getResource("/test-resources/sd.xml");
         Bundle b = EasyMock.createMock(Bundle.class);
         EasyMock.expect(b.findEntries("OSGI-INF/remote-service", "*.xml", false)).andReturn(
-            Collections.enumeration(Arrays.asList(getClass().getResource("/test-resources/sd.xml")))).anyTimes();
+            Collections.enumeration(Arrays.asList(sdURL))).anyTimes();
         EasyMock.replay(b);
 
         List<Element> elements = ServiceDecoratorImpl.getDecorationElements(b);

Modified: cxf/dosgi/trunk/dsw/cxf-topology-manager/pom.xml
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-topology-manager/pom.xml?rev=1408284&r1=1408283&r2=1408284&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-topology-manager/pom.xml (original)
+++ cxf/dosgi/trunk/dsw/cxf-topology-manager/pom.xml Mon Nov 12 13:46:43 2012
@@ -1,19 +1,15 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <!--
-        Licensed to the Apache Software Foundation (ASF) under one or more
-        contributor license agreements. See the NOTICE file distributed with
-        this work for additional information regarding copyright ownership.
-        The ASF licenses this file to you under the Apache License, Version
-        2.0 (the "License"); you may not use this file except in compliance
-        with the License. You may obtain a copy of the License at
-
-        http://www.apache.org/licenses/LICENSE-2.0 Unless required by
-        applicable law or agreed to in writing, software distributed under the
-        License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-        CONDITIONS OF ANY KIND, either express or implied. See the License for
-        the specific language governing permissions and limitations under the
-        License.
-    -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <!-- Licensed to the Apache Software Foundation (ASF) under one or more 
+        contributor license agreements. See the NOTICE file distributed with this 
+        work for additional information regarding copyright ownership. The ASF licenses 
+        this file to you under the Apache License, Version 2.0 (the "License"); you 
+        may not use this file except in compliance with the License. You may obtain 
+        a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless 
+        required by applicable law or agreed to in writing, software distributed 
+        under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 
+        OR CONDITIONS OF ANY KIND, either express or implied. See the License for 
+        the specific language governing permissions and limitations under the License. -->
 
     <modelVersion>4.0.0</modelVersion>
     <artifactId>cxf-dosgi-ri-topology-manager</artifactId>
@@ -51,9 +47,13 @@
             </exclusions>
         </dependency>
         <dependency>
-	     <groupId>org.osgi</groupId>
-	     <artifactId>org.osgi.enterprise</artifactId>
-	     <version>${osgi.version}</version>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.enterprise</artifactId>
+            <version>${osgi.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
         </dependency>
         <dependency>
             <groupId>junit</groupId>
@@ -76,7 +76,9 @@
                     <manifestLocation>META-INF</manifestLocation>
                     <instructions>
                         <Bundle-Name>CXF dOSGi Topology Manager</Bundle-Name>
-                        <Bundle-Description>Default CXF Topology Manager as described in OSGi Remote Service Admin specification.</Bundle-Description>
+                        <Bundle-Description>Default CXF Topology Manager
+                            as described in OSGi Remote Service Admin
+                            specification.</Bundle-Description>
                         <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                         <Bundle-Vendor>The Apache Software Foundation</Bundle-Vendor>
                         <Bundle-Activator>org.apache.cxf.dosgi.topologymanager.Activator</Bundle-Activator>

Modified: cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/Activator.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/Activator.java?rev=1408284&r1=1408283&r2=1408284&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/Activator.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/Activator.java Mon Nov 12 13:46:43 2012
@@ -18,16 +18,16 @@
   */
 package org.apache.cxf.dosgi.topologymanager;
 
-import java.util.logging.Logger;
-
 import org.apache.cxf.dosgi.topologymanager.exporter.TopologyManagerExport;
 import org.apache.cxf.dosgi.topologymanager.importer.TopologyManagerImport;
 import org.apache.cxf.dosgi.topologymanager.rsatracker.RemoteServiceAdminTracker;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class Activator implements BundleActivator {
-    private static final Logger LOG = Logger.getLogger(Activator.class.getName());
+    private static final Logger LOG = LoggerFactory.getLogger(Activator.class);
 
     private TopologyManagerExport topManager;
     private TopologyManagerImport topManagerImport;
@@ -35,7 +35,7 @@ public class Activator implements Bundle
     private RemoteServiceAdminTracker rsaTracker;
 
     public void start(BundleContext bc) throws Exception {
-        LOG.fine("TopologyManager: start()");
+        LOG.debug("TopologyManager: start()");
         rsaTracker = new RemoteServiceAdminTracker(bc);
         topManager = new TopologyManagerExport(bc, rsaTracker);
         topManagerImport = new TopologyManagerImport(bc, rsaTracker);
@@ -46,7 +46,7 @@ public class Activator implements Bundle
     }
 
     public void stop(BundleContext bc) throws Exception {
-        LOG.fine("TopologyManager: stop()");
+        LOG.debug("TopologyManager: stop()");
         topManager.stop();
         topManagerImport.stop();
         rsaTracker.close();

Modified: cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/exporter/EndpointListenerNotifier.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/exporter/EndpointListenerNotifier.java?rev=1408284&r1=1408283&r2=1408284&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/exporter/EndpointListenerNotifier.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/exporter/EndpointListenerNotifier.java Mon Nov 12 13:46:43 2012
@@ -23,8 +23,6 @@ import java.util.Collection;
 import java.util.Dictionary;
 import java.util.Hashtable;
 import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Filter;
@@ -35,12 +33,14 @@ import org.osgi.service.remoteserviceadm
 import org.osgi.service.remoteserviceadmin.ExportReference;
 import org.osgi.service.remoteserviceadmin.ExportRegistration;
 import org.osgi.util.tracker.ServiceTracker;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Tracks EndpointListeners and allows to notify them of endpoints
  */
 public class EndpointListenerNotifier {
-    private final static Logger LOG = Logger.getLogger(EndpointListenerNotifier.class.getName());
+    private final static Logger LOG = LoggerFactory.getLogger(EndpointListenerNotifier.class);
     private BundleContext bctx;
     private ServiceTracker stEndpointListeners;
     private ExportRepository exportRepository;
@@ -51,14 +51,14 @@ public class EndpointListenerNotifier {
         this.stEndpointListeners = new ServiceTracker(bctx, EndpointListener.class.getName(), null) {
             @Override
             public Object addingService(ServiceReference reference) {
-                LOG.fine("TopologyManager: new EndpointListener that wants to be informed about whats going on ... ");
+                LOG.debug("new EndpointListener detected");
                 notifyListenerOfAllExistingExports(reference);
                 return super.addingService(reference);
             }
 
             @Override
             public void modifiedService(ServiceReference reference, Object service) {
-                LOG.fine("TopologyManager: EndpointListener changed ... ");
+                LOG.debug("EndpointListener modified");
                 notifyListenerOfAllExistingExports(reference);
                 super.modifiedService(reference, service);
             }
@@ -112,7 +112,7 @@ public class EndpointListenerNotifier {
         EndpointListener epl = (EndpointListener)bctx.getService(epListenerReference);
         List<Filter> filters = getFiltersFromEndpointListenerScope(epListenerReference, bctx);
 
-        LOG.finer("TopologyManager: notifyListenerOfAddingIfAppropriate() ");
+        LOG.debug("notifyListenerOfAdding");
         for (ExportRegistration exReg : exportRegistrations) {
             EndpointDescription endpoint = getExportedEndpoint(exReg);
             List<Filter> matchingFilters = getMatchingFilters(filters, endpoint);
@@ -127,7 +127,6 @@ public class EndpointListenerNotifier {
                                           Collection<ExportRegistration> exportRegistrations) {
         EndpointListener epl = (EndpointListener)bctx.getService(epListenerReference);
         List<Filter> filters = getFiltersFromEndpointListenerScope(epListenerReference, bctx);
-        LOG.finer("TopologyManager: notifyListenerOfREMOVALIfAppropriate() ");
         for (ExportRegistration exReg : exportRegistrations) {
             EndpointDescription endpoint = getExportedEndpoint(exReg);
             List<Filter> matchingFilters = getMatchingFilters(filters, endpoint);
@@ -155,12 +154,12 @@ public class EndpointListenerNotifier {
                     if (o instanceof String) {
                         filters.add(bctx.createFilter((String) o));
                     } else {
-                        LOG.warning("Component of a filter is not a string -> skipped !");
+                        LOG.warn("Component of a EndpointListener filter is not a string -> skipped !");
                     }
                 }
             }
         } catch (InvalidSyntaxException e) {
-            LOG.log(Level.SEVERE, e.getMessage(), e);
+            LOG.error(e.getMessage(), e);
         }
         return filters;
     }
@@ -171,12 +170,18 @@ public class EndpointListenerNotifier {
         Dictionary<String, Object> d = getEndpointProperties(endpoint);
 
         for (Filter filter : filters) {
-            if (LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Matching: " + filter + "  against " + d);
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("Matching: {} against {}", filter, d);
             }
             if (filter.match(d)) {
-                LOG.fine("Listener matched one of the Endpoints !!!! --> calling removed() ...");
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("Filter {} matches endpoint {}", filter, d);
+                }
                 matchingFilters.add(filter);
+            } else {
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("Filter {} does not match endpoint {}", filter, d);
+                }
             }
         }
         return matchingFilters;
@@ -194,7 +199,7 @@ public class EndpointListenerNotifier {
            String filter = "(" + EndpointListener.ENDPOINT_LISTENER_SCOPE + "=*)";
            result = bctx.getServiceReferences(EndpointListener.class.getName(), filter);
        } catch (InvalidSyntaxException e) {
-           LOG.log(Level.SEVERE, e.getMessage(), e);
+           LOG.error(e.getMessage(), e);
        }
        return (result == null) ? new ServiceReference[]{} : result;
    }

Modified: cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/exporter/TopologyManagerExport.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/exporter/TopologyManagerExport.java?rev=1408284&r1=1408283&r2=1408284&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/exporter/TopologyManagerExport.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/exporter/TopologyManagerExport.java Mon Nov 12 13:46:43 2012
@@ -28,8 +28,6 @@ import java.util.concurrent.ExecutorServ
 import java.util.concurrent.LinkedBlockingQueue;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 
 import org.apache.cxf.dosgi.topologymanager.rsatracker.RemoteServiceAdminLifeCycleListener;
 import org.apache.cxf.dosgi.topologymanager.rsatracker.RemoteServiceAdminTracker;
@@ -43,6 +41,8 @@ import org.osgi.service.remoteserviceadm
 import org.osgi.service.remoteserviceadmin.RemoteConstants;
 import org.osgi.service.remoteserviceadmin.RemoteServiceAdmin;
 import org.osgi.service.remoteserviceadmin.RemoteServiceAdminEvent;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * <li>This class keeps a list of currently imported and exported endpoints <li>It requests the import/export
@@ -50,7 +50,7 @@ import org.osgi.service.remoteserviceadm
  */
 public class TopologyManagerExport implements ExportRepository {
 
-    private final static Logger LOG = Logger.getLogger(TopologyManagerExport.class.getName());
+    private final static Logger LOG = LoggerFactory.getLogger(TopologyManagerExport.class);
 
     private final BundleContext bctx;
     private final EndpointListenerNotifier epListenerNotifier;
@@ -95,14 +95,14 @@ public class TopologyManagerExport imple
         });
         serviceListerner = new ServiceListener() {
             public void serviceChanged(ServiceEvent event) {
-                LOG.fine("Received ServiceEvent: " + event);
                 ServiceReference sref = event.getServiceReference();
                 if (event.getType() == ServiceEvent.REGISTERED) {
-                    LOG.fine("Registered");
+                    LOG.debug("Received REGISTERED ServiceEvent: {}", event);
                     if (shouldExportService(sref)) {
                         exportService(sref);
                     }
                 } else if (event.getType() == ServiceEvent.UNREGISTERING) {
+                    LOG.debug("Received UNREGISTERING ServiceEvent: {}", event);
                     removeService(sref);
                 }
             }
@@ -139,7 +139,7 @@ public class TopologyManagerExport imple
     }
 
     protected void triggerExportForRemoteServiceAdmin(RemoteServiceAdmin rsa) {
-        LOG.finer("TopologyManager: triggerExportImportForRemoteSericeAdmin()");
+        LOG.debug("triggerExportImportForRemoteSericeAdmin()");
 
         synchronized (exportedServices) {
             for (ServiceReference serviceRef : exportedServices.keySet()) {
@@ -147,10 +147,10 @@ public class TopologyManagerExport imple
                 String bundleName = serviceRef.getBundle().getSymbolicName();
                 if (rsaExports.containsKey(rsa)) {
                     // already handled....
-                    LOG.fine("TopologyManager: service from bundle " + bundleName + "is already handled by this RSA");
+                    LOG.debug("service from bundle {} is already handled by this RSA", bundleName);
                 } else {
                     // trigger export of this service....
-                    LOG.fine("TopologyManager: service from bundle " + bundleName + " is to be exported by this RSA");
+                    LOG.debug("service from bundle {} is to be exported by this RSA", bundleName);
                     exportService(serviceRef);
                 }
             }
@@ -165,7 +165,7 @@ public class TopologyManagerExport imple
         try {
             exportExistingServices();
         } catch (InvalidSyntaxException e) {
-            LOG.log(Level.FINER, "Failed to check existing services.", e);
+            LOG.debug("Failed to export existing services.", e);
         }
     }
 
@@ -217,7 +217,7 @@ public class TopologyManagerExport imple
     }
 
     private void doExportService(final ServiceReference sref) {
-        LOG.finer("TopologyManager: exporting service ...");
+        LOG.debug("Exporting service");
 
         Map<RemoteServiceAdmin, Collection<ExportRegistration>> exports = null;
 
@@ -229,11 +229,10 @@ public class TopologyManagerExport imple
             return;
         }
         if (remoteServiceAdminTracker == null || remoteServiceAdminTracker.size() == 0) {
-            LOG.log(Level.SEVERE,
-                    "No RemoteServiceAdmin available! Unable to export service from bundle {0}, interfaces: {1}",
-                    new Object[] {
-                            sref.getBundle().getSymbolicName(),
-                            sref.getProperty(org.osgi.framework.Constants.OBJECTCLASS) });
+            LOG.error(
+                    "No RemoteServiceAdmin available! Unable to export service from bundle {}, interfaces: {}",
+                    sref.getBundle().getSymbolicName(),
+                    sref.getProperty(org.osgi.framework.Constants.OBJECTCLASS));
         }
 
 
@@ -244,24 +243,22 @@ public class TopologyManagerExport imple
 
             if (exports.containsKey(remoteServiceAdmin)) {
                 // already handled by this remoteServiceAdmin
-                LOG.fine("TopologyManager: already handled by this remoteServiceAdmin -> skipping");
+                LOG.debug("already handled by this remoteServiceAdmin -> skipping");
             } else {
                 // TODO: additional parameter Map ?
-                LOG.fine("TopologyManager: exporting ...");
+                LOG.debug("exporting ...");
                 Collection<ExportRegistration> endpoints = remoteServiceAdmin
                         .exportService(sref, null);
                 if (endpoints == null) {
                     // TODO export failed -> What should be done here?
-                    LOG.severe("TopologyManager: export failed");
+                    LOG.error("export failed");
                     exports.put(remoteServiceAdmin, null);
                 } else {
-                    LOG.info("TopologyManager: export sucessful Endpoints:"
-                            + endpoints);
+                    LOG.info("TopologyManager: export sucessful Endpoints: {}", endpoints);
                     // enqueue in local list of endpoints
                     exports.put(remoteServiceAdmin, endpoints);
 
-                    epListenerNotifier
-                            .nofifyEndpointListenersOfAdding(endpoints);
+                    epListenerNotifier.nofifyEndpointListenersOfAdding(endpoints);
                 }
             }
         }

Modified: cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/importer/EndpointListenerManager.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/importer/EndpointListenerManager.java?rev=1408284&r1=1408283&r2=1408284&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/importer/EndpointListenerManager.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/importer/EndpointListenerManager.java Mon Nov 12 13:46:43 2012
@@ -22,18 +22,19 @@ import java.util.ArrayList;
 import java.util.Dictionary;
 import java.util.Hashtable;
 import java.util.List;
-import java.util.logging.Logger;
 
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceRegistration;
 import org.osgi.service.remoteserviceadmin.EndpointListener;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Manages an EndpointListener add adjusts its scope according to requested service filters
  */
 public class EndpointListenerManager {
 
-    private static final Logger LOG = Logger.getLogger(EndpointListenerManager.class.getName());
+    private static final Logger LOG = LoggerFactory.getLogger(EndpointListenerManager.class);
     
     private final BundleContext bctx;
     private ServiceRegistration serviceRegistration;
@@ -55,12 +56,10 @@ public class EndpointListenerManager {
     }
 
     protected void extendScope(String filter) {
-        if (filter == null)
+        if (filter == null) {
             return;
-        
-        
-        LOG.fine("EndpointListener: extending scope by " + filter);
-
+        }
+        LOG.debug("EndpointListenxtending scope by {}", filter);
         synchronized (filters) {
             filters.add(filter);
         }
@@ -68,11 +67,10 @@ public class EndpointListenerManager {
     }
 
     protected void reduceScope(String filter) {
-        if (filter == null)
+        if (filter == null) {
             return;
-        
-        
-        LOG.fine("EndpointListener: reducing scope by " + filter);
+        }
+        LOG.debug("EndpointListener: reducing scope by {}", filter);
         synchronized (filters) {
             filters.remove(filter);
         }
@@ -83,7 +81,9 @@ public class EndpointListenerManager {
         Dictionary<String, Object> p = new Hashtable<String, Object>();
 
         synchronized (filters) {
-            LOG.finer("EndpointListener: current filter: " + filters);
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("Current filter: " + filters);
+            }
             // TODO: make a copy of the filter list
             p.put(EndpointListener.ENDPOINT_LISTENER_SCOPE, filters);
         }
@@ -92,8 +92,6 @@ public class EndpointListenerManager {
     }
 
     private void updateRegistration() {
-        // This tends to be verbose.
-        LOG.finer("EndpointListenerImpl: filters: " + filters);
         serviceRegistration.setProperties(getRegistrationProperties());
     }
 

Modified: cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/importer/ListenerHookImpl.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/importer/ListenerHookImpl.java?rev=1408284&r1=1408283&r2=1408284&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/importer/ListenerHookImpl.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/importer/ListenerHookImpl.java Mon Nov 12 13:46:43 2012
@@ -22,8 +22,6 @@ import java.util.Collection;
 import java.util.HashSet;
 import java.util.Set;
 import java.util.UUID;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -31,13 +29,15 @@ import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;
 import org.osgi.framework.hooks.service.ListenerHook;
 import org.osgi.service.remoteserviceadmin.RemoteConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Listens for service listeners and informs ServiceInterestListener about added and removed interest
  * in services
  */
 public class ListenerHookImpl implements ListenerHook {
-    private static final Logger LOG = Logger.getLogger(ListenerHookImpl.class.getName());
+    private static final Logger LOG = LoggerFactory.getLogger(ListenerHookImpl.class);
     private BundleContext bctx;
     private ServiceInterestListener serviceInterestListener;
 
@@ -65,28 +65,27 @@ public class ListenerHookImpl implements
 
     @SuppressWarnings("rawtypes")
     public void added(Collection/* <ListenerInfo> */ listeners) {
-        if (LOG.isLoggable(Level.FINE)) {
-            LOG.fine("ListenerHookImpl: added() " + listeners);
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("added listeners {}", listeners);
         }
         for (Object li : listeners) {
             ListenerInfo listenerInfo = (ListenerInfo)li;
-            LOG.fine("*** Filter: " + listenerInfo.getFilter());
+            LOG.debug("Filter {}", listenerInfo.getFilter());
 
             String className = getClassNameFromFilter(listenerInfo.getFilter());
 
             if (listenerInfo.getBundleContext().getBundle().equals(bctx.getBundle())) {
-                LOG.fine("ListenerHookImpl: skipping request from myself");
+                LOG.debug("ListenerHookImpl: skipping request from myself");
                 continue;
             }
 
             if (listenerInfo.getFilter() == null) {
-                LOG.fine("ListenerHookImpl: skipping empty filter");
+                LOG.debug("skipping empty filter");
                 continue;
             }
 
             if (isClassExcluded(className)) {
-                LOG.fine("ListenerHookImpl: skipping import request for excluded classs ["
-                                   + className + "]");
+                LOG.debug("Skipping import request for excluded classs [{}]", className);
                 continue;
             }
             String exFilter = extendFilter(listenerInfo.getFilter(), bctx);
@@ -98,13 +97,13 @@ public class ListenerHookImpl implements
 
     @SuppressWarnings("rawtypes")
     public void removed(Collection/* <ListenerInfo> */ listeners) {
-        if (LOG.isLoggable(Level.FINE)) {
-            LOG.fine("ListenerHookImpl: removed: " + listeners);
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("removed: " + listeners);
         }
 
         for (Object li : listeners) {
             ListenerInfo listenerInfo = (ListenerInfo)li;
-            LOG.fine("*** Filter: " + listenerInfo.getFilter());
+            LOG.debug("Filter {}", listenerInfo.getFilter());
 
             // TODO: determine if service was handled ? 
             String exFilter = extendFilter(listenerInfo.getFilter(), bctx);

Modified: cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/importer/TopologyManagerImport.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/importer/TopologyManagerImport.java?rev=1408284&r1=1408283&r2=1408284&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/importer/TopologyManagerImport.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/importer/TopologyManagerImport.java Mon Nov 12 13:46:43 2012
@@ -29,8 +29,6 @@ import java.util.concurrent.ExecutorServ
 import java.util.concurrent.LinkedBlockingQueue;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 
 import org.apache.cxf.dosgi.topologymanager.rsatracker.RemoteServiceAdminLifeCycleListener;
 import org.apache.cxf.dosgi.topologymanager.rsatracker.RemoteServiceAdminTracker;
@@ -43,6 +41,8 @@ import org.osgi.service.remoteserviceadm
 import org.osgi.service.remoteserviceadmin.RemoteServiceAdmin;
 import org.osgi.service.remoteserviceadmin.RemoteServiceAdminEvent;
 import org.osgi.service.remoteserviceadmin.RemoteServiceAdminListener;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Listens for remote endpoints using the EndpointListener interface and the EndpointListenerManager.
@@ -52,7 +52,7 @@ import org.osgi.service.remoteserviceadm
  */
 public class TopologyManagerImport implements EndpointListener, RemoteServiceAdminListener, ServiceInterestListener {
 
-    private final static Logger LOG = Logger.getLogger(TopologyManagerImport.class.getName());
+    private final static Logger LOG = LoggerFactory.getLogger(TopologyManagerImport.class);
     private ExecutorService execService;
 
     private final EndpointListenerManager endpointListenerManager;
@@ -126,7 +126,7 @@ public class TopologyManagerImport imple
      */
     public void removeServiceInterest(String filter) {
         if (importInterests.removeReference(filter) <= 0) {
-            LOG.log(Level.FINE, "last reference to import interest is gone -> removing interest  filter: {0}", filter);
+            LOG.debug("last reference to import interest is gone -> removing interest  filter: {}", filter);
             endpointListenerManager.reduceScope(filter);
             List<ImportRegistration> irs = importedServices.remove(filter);
             if (irs != null) {
@@ -140,18 +140,17 @@ public class TopologyManagerImport imple
     }
 
     public void endpointAdded(EndpointDescription epd, String filter) {
-        if(filter==null){
-            LOG.severe("Endpoint is not handled because no matching filter was provided!");
+        if (filter==null) {
+            LOG.error("Endpoint is not handled because no matching filter was provided!");
             return;
         }
-        // Decide if it is worth it ? 
-        LOG.log(Level.FINE, "importable service added for filter {0} -> {1}", new Object[]{filter, epd});
+        LOG.debug("importable service added for filter {}, endpoint {}", filter, epd);
         addImportPossibility(epd, filter);
         triggerImport(filter);
     }
 
     public void endpointRemoved(EndpointDescription epd, String filter) {
-        LOG.fine("EndpointRemoved -> " + epd);
+        LOG.debug("EndpointRemoved {}", epd);
         removeImportPossibility(epd, filter);
         triggerImport(filter);
     }
@@ -180,7 +179,7 @@ public class TopologyManagerImport imple
     }
 
     public void triggerImportsForRemoteServiceAdmin(RemoteServiceAdmin rsa) {
-        LOG.fine("New RSA detected trying to import services with it");
+        LOG.debug("New RSA detected trying to import services with it");
         synchronized (importPossibilities) {
             Set<Map.Entry<String, List<EndpointDescription>>> entries = importPossibilities.entrySet();
             for (Entry<String, List<EndpointDescription>> entry : entries) {
@@ -190,7 +189,7 @@ public class TopologyManagerImport imple
     }
 
     private void triggerImport(final String filter) {
-        LOG.log(Level.FINE, "import of a service for filter {0} was queued", filter);
+        LOG.debug("Import of a service for filter {} was queued", filter);
 
         execService.execute(new Runnable() {
             public void run() {
@@ -202,7 +201,7 @@ public class TopologyManagerImport imple
                         }
                     }
                 } catch (Exception e) {
-                    LOG.log(Level.SEVERE, e.getMessage(), e);
+                    LOG.error(e.getMessage(), e);
                 }
                 // Notify EndpointListeners ? NO!
             }
@@ -280,7 +279,7 @@ public class TopologyManagerImport imple
         for (RemoteServiceAdmin rsa : remoteServiceAdminTracker.getList()) {
             ImportRegistration ir = rsa.importService(ep);
             if (ir != null && ir.getException() == null) {
-                LOG.fine("service impoort was successful: " + ir);
+                LOG.debug("Service import was successful {}", ir);
                 return ir;
             }
         }



Mime
View raw message