perfsonar-dev - perfsonar: r4818 - trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration
Subject: perfsonar development work
List archive
perfsonar: r4818 - trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration
Chronological Thread
- From:
- To:
- Subject: perfsonar: r4818 - trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration
- Date: Wed, 17 Dec 2008 22:41:14 -0500
Author: michael.bischoff
Date: 2008-12-17 22:41:13 -0500 (Wed, 17 Dec 2008)
New Revision: 4818
Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/LSRegistrationComponent.java
Log:
fixing LS registration for local urls.
Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/LSRegistrationComponent.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/LSRegistrationComponent.java
2008-12-18 03:19:58 UTC (rev 4817)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/LSRegistrationComponent.java
2008-12-18 03:41:13 UTC (rev 4818)
@@ -145,8 +145,7 @@
}
break;
}
- logger.debug("LSRegistrationComponent.runAction: register
ServiceContent = "
- + content);
+ logger.debug("LSRegistrationComponent.runAction: register
ServiceContent = " + content);
ServiceLSRegistrator registrator = new
GenericServiceLSRegistrator(
new PropertiesServiceDescription(), content);
@@ -163,39 +162,34 @@
if ((localLsUrls == null)&&(rootHints == null))
throw new
PerfSONARException("error.lsregistration.no_ls_url");
- logger.debug("LSRegistrationComponent.runAction: "
- + "register to gLS-es");
+ logger.debug("LSRegistrationComponent.runAction: register to
gLS-es");
//register to all explicit LSes from service.r.ls_url
- ArrayList<String> urls = new ArrayList<String>();
+
LSListAddresses list = new LSListAddresses();
- if (rootHints != null)
+ if (localLsUrls != null) {
+ ArrayList<String> urls = new ArrayList<String>();
list.addFromString(urls, localLsUrls);
- int i = 1;
- for (String url : urls) {
-
- logger.debug("LSRegistrationComponent send to [" + i + "/"
- + urls.size() + "] url: [" + url + "]: ");
- registerToLS(registrator, url);
- i++;
-
+ int i = 1;
+ for (String url : urls) {
+ logger.debug("LSRegistrationComponent send to [" + i
+ "/" + urls.size() + "] url: [" + url + "]: ");
+ registerToLS(registrator, url);
+ i++;
+ }
}
-
- //register to one of LSes from root.hints ( service.r.root_hints
prop.)
- ArrayList<String> remoteUrls = new ArrayList<String>();
- if (rootHints != null)
- list.addFromMultipleURLs(remoteUrls, rootHints);
- for (String url : remoteUrls) {
-
- logger.debug("LSRegistrationComponent send to gLS url from
roots.hints: [" + url + "]: ");
- if (registerToLS(registrator, url) == true)
- break; //break after first success
-
- }
+ if (rootHints != null) {
+ //register to one of LSes from root.hints (
service.r.root_hints prop.)
+ ArrayList<String> remoteUrls = new ArrayList<String>();
+ list.addFromMultipleURLs(remoteUrls, rootHints);
+ for (String url : remoteUrls) {
+ logger.debug("LSRegistrationComponent send to gLS url
from roots.hints: [" + url + "]: ");
+ if (registerToLS(registrator, url) == true)
+ break; //break after first success
+ }
+ }
} catch (PerfSONARException e) {
- logger.error("LSRegistrationComponent.runAction: Error while
registration: "
- + e.getMessage());
+ logger.error("LSRegistrationComponent.runAction: Error while
registration: " + e.getMessage());
}
}
- perfsonar: r4818 - trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration, svnlog, 12/17/2008
Archive powered by MHonArc 2.6.16.