cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amic...@apache.org
Subject svn commit: r1536620 - in /cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper: publish/PublishingEndpointListener.java subscribe/InterfaceMonitor.java
Date Tue, 29 Oct 2013 09:34:21 GMT
Author: amichai
Date: Tue Oct 29 09:34:21 2013
New Revision: 1536620

URL: http://svn.apache.org/r1536620
Log:
adjusted log details in zookeeper discovery

Modified:
    cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/publish/PublishingEndpointListener.java
    cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/subscribe/InterfaceMonitor.java

Modified: cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/publish/PublishingEndpointListener.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/publish/PublishingEndpointListener.java?rev=1536620&r1=1536619&r2=1536620&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/publish/PublishingEndpointListener.java
(original)
+++ cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/publish/PublishingEndpointListener.java
Tue Oct 29 09:34:21 2013
@@ -166,8 +166,8 @@ public class PublishingEndpointListener 
             LOG.debug("Removing ZooKeeper node: {}", fullPath);
             try {
                 zk.delete(fullPath, -1);
-            } catch (Exception e) {
-                LOG.debug("Error while removing endpoint");
+            } catch (Exception ex) {
+                LOG.debug("Error while removing endpoint: {}", ex); // e.g. session expired
             }
         }
     }

Modified: cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/subscribe/InterfaceMonitor.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/subscribe/InterfaceMonitor.java?rev=1536620&r1=1536619&r2=1536620&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/subscribe/InterfaceMonitor.java
(original)
+++ cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/subscribe/InterfaceMonitor.java
Tue Oct 29 09:34:21 2013
@@ -98,7 +98,7 @@ public class InterfaceMonitor implements
      * Zookeeper Watcher interface callback.
      */
     public void process(WatchedEvent event) {
-        LOG.debug("ZooKeeper watcher callback for event {}", event);
+        LOG.debug("ZooKeeper watcher callback on node {} for event {}", znode, event);
         processDelta();
     }
 
@@ -131,7 +131,7 @@ public class InterfaceMonitor implements
         }
 
         if (zk.getState() != ZooKeeper.States.CONNECTED) {
-            LOG.info("ZooKeeper connection was already closed! Not processing changed event.");
+            LOG.debug("ZooKeeper connection was already closed! Not processing changed event.");
             return;
         }
 
@@ -143,7 +143,11 @@ public class InterfaceMonitor implements
                 LOG.debug("znode {} doesn't exist -> not processing any changes", znode);
             }
         } catch (Exception e) {
-            LOG.error("Error getting ZooKeeper data.", e);
+            if (zk.getState() != ZooKeeper.States.CONNECTED) {
+                LOG.debug("Error getting Zookeeper data: " + e); // e.g. session expired,
handled by ZooKeeperDiscovery
+            } else {
+                LOG.error("Error getting ZooKeeper data.", e);
+            }
         }
     }
 



Mime
View raw message