karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anierb...@apache.org
Subject svn commit: r1466219 - /karaf/cellar/branches/cellar-2.2.x/cloud/src/main/java/org/apache/karaf/cellar/cloud/BlobStoreDiscoveryService.java
Date Tue, 09 Apr 2013 20:37:39 GMT
Author: anierbeck
Date: Tue Apr  9 20:37:39 2013
New Revision: 1466219

URL: http://svn.apache.org/r1466219
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/cloud/src/main/java/org/apache/karaf/cellar/cloud/BlobStoreDiscoveryService.java

Modified: karaf/cellar/branches/cellar-2.2.x/cloud/src/main/java/org/apache/karaf/cellar/cloud/BlobStoreDiscoveryService.java
URL: http://svn.apache.org/viewvc/karaf/cellar/branches/cellar-2.2.x/cloud/src/main/java/org/apache/karaf/cellar/cloud/BlobStoreDiscoveryService.java?rev=1466219&r1=1466218&r2=1466219&view=diff
==============================================================================
--- karaf/cellar/branches/cellar-2.2.x/cloud/src/main/java/org/apache/karaf/cellar/cloud/BlobStoreDiscoveryService.java
(original)
+++ karaf/cellar/branches/cellar-2.2.x/cloud/src/main/java/org/apache/karaf/cellar/cloud/BlobStoreDiscoveryService.java
Tue Apr  9 20:37:39 2013
@@ -96,6 +96,7 @@ public class BlobStoreDiscoveryService i
             Object obj = readBlob(container, ip);
             //Check if ip hasn't been updated recently.
             if (obj instanceof DateTime) {
+            	LOGGER.debug("CELLAR CLOUD: retrieved a DateTime from blog store");
                 DateTime registeredTime = (DateTime) obj;
                 if (registeredTime != null && registeredTime.plusSeconds(validityPeriod).isAfterNow())
{
                     members.add(ip);
@@ -103,6 +104,7 @@ public class BlobStoreDiscoveryService i
                     blobStore.removeBlob(container, ip);
                 }
             } else if (obj instanceof ServiceContainer) {
+            	LOGGER.debug("CELLAR CLOUD: retrieved a ServiceContainer from blog store");
             	ServiceContainer serviceContainer = (ServiceContainer) obj;
             	DateTime registeredTime = serviceContainer.getRegisteredTime();
             	if (registeredTime != null && registeredTime.plusSeconds(validityPeriod).isAfterNow())
{
@@ -128,7 +130,7 @@ public class BlobStoreDiscoveryService i
      */
     public void refresh() {
         DateTime now = new DateTime();
-        createBlob(container, ipAddress, now);
+        createBlob(container, ipAddress, new ServiceContainer(getHostAdress(),now));
     }
 
     /**



Mime
View raw message