Author: anierbeck
Date: Wed Apr 10 08:12:13 2013
New Revision: 1466371

URL: http://svn.apache.org/r1466371
Log:
[KARAF-2262] - cellar-cloud: The IP is not enough, sometimes the IP is hidden 
but a valid dns name is available

Modified:
    
karaf/cellar/branches/cellar-2.2.x/core/src/main/java/org/apache/karaf/cellar/core/discovery/DiscoveryTask.java

Modified: 
karaf/cellar/branches/cellar-2.2.x/core/src/main/java/org/apache/karaf/cellar/core/discovery/DiscoveryTask.java
URL: 
http://svn.apache.org/viewvc/karaf/cellar/branches/cellar-2.2.x/core/src/main/java/org/apache/karaf/cellar/core/discovery/DiscoveryTask.java?rev=1466371&r1=1466370&r2=1466371&view=diff
==============================================================================
--- 
karaf/cellar/branches/cellar-2.2.x/core/src/main/java/org/apache/karaf/cellar/core/discovery/DiscoveryTask.java
 (original)
+++ 
karaf/cellar/branches/cellar-2.2.x/core/src/main/java/org/apache/karaf/cellar/core/discovery/DiscoveryTask.java
 Wed Apr 10 08:12:13 2013
@@ -40,10 +40,12 @@ public class DiscoveryTask implements Ru
     private ScheduledExecutorService scheduler = 
Executors.newScheduledThreadPool(1);
 
     public void init() {
+       LOGGER.debug("CELLAR DISCOVERY: a new Task initalized");
         scheduler.scheduleWithFixedDelay(this, 10, 10, TimeUnit.SECONDS);
     }
 
     public void destroy() {
+       LOGGER.debug("CELLAR DISCOVERY: task is beeing destroyed");
         scheduler.shutdown();
     }
 
@@ -53,7 +55,6 @@ public class DiscoveryTask implements Ru
 
         if (configurationAdmin != null) {
             Set<String> members = new LinkedHashSet<String>();
-            //TODO: some sort of timing should be included here ...
             if (discoveryServices != null && !discoveryServices.isEmpty()) {
                 for (DiscoveryService service : discoveryServices) {
                     service.refresh();
@@ -73,7 +74,11 @@ public class DiscoveryTask implements Ru
                 } catch (IOException e) {
                     LOGGER.error("Failed to update member list", e);
                 }
+            } else {
+               LOGGER.trace("CELLAR DISCOVERY: no discovery services found ... 
");
             }
+        } else {
+               LOGGER.trace("CELLAR DISCOVERY: no config admin found");
         }
     }
 


Reply via email to