Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r3422 - in trunk/perfsonar_base/src/main/java/org/perfsonar/service: base/registration measurementArchive/register

Subject: perfsonar development work

List archive

perfsonar: r3422 - in trunk/perfsonar_base/src/main/java/org/perfsonar/service: base/registration measurementArchive/register


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r3422 - in trunk/perfsonar_base/src/main/java/org/perfsonar/service: base/registration measurementArchive/register
  • Date: Thu, 28 Feb 2008 07:35:00 -0500

Author: roman
Date: 2008-02-28 07:35:00 -0500 (Thu, 28 Feb 2008)
New Revision: 3422

Added:

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/InformationExistDbXmlrpcServiceContent.java
Modified:

trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/register/LSRegistrationComponent.java
Log:

Now MA service can take metadatas for LS register requests not only from
metadata xml file but also from xml database. The latter option is
very important when metadata configuration in xml db is updated while the
service is already running.




Added:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/InformationExistDbXmlrpcServiceContent.java


Property changes on:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/InformationExistDbXmlrpcServiceContent.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/register/LSRegistrationComponent.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/register/LSRegistrationComponent.java
2008-02-27 15:13:25 UTC (rev 3421)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/register/LSRegistrationComponent.java
2008-02-28 12:35:00 UTC (rev 3422)
@@ -6,6 +6,7 @@


import org.ggf.ns.nmwg.base.v2_0.Message;
+
import org.perfsonar.base.auxiliary.AuxiliaryComponent;
import org.perfsonar.base.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.base.auxiliary.ComponentNames;
@@ -13,9 +14,12 @@
import org.perfsonar.base.auxiliary.components.logger.LoggerComponent;
import org.perfsonar.base.auxiliary.components.simplescheduler.Scheduler;
import
org.perfsonar.base.auxiliary.components.simplescheduler.SchedulerAction;
+
import org.perfsonar.base.exceptions.PerfSONARException;
+
import org.perfsonar.service.base.registration.GenericServiceLSRegistrator;
import
org.perfsonar.service.base.registration.InformationXMLFileServiceContent;
+import
org.perfsonar.service.base.registration.InformationExistDbXmlrpcServiceContent;
import org.perfsonar.service.base.registration.PropertiesServiceDescription;
import org.perfsonar.service.base.registration.ServiceLSRegistrator;

@@ -42,8 +46,10 @@

private static final String MA_CONFIG_FILE = "service.ma.conf_file";

+ private static final String
MA_CONFIG_STORE="service.ma.conf_file.store_type"; //"xmldb" or "file"


+
// -------------------------------------------- class fields


@@ -114,21 +120,45 @@

try {

- String maRRDConfigFile =
-
configuration.getProperty(LSRegistrationComponent.MA_CONFIG_FILE);
-
String lsURL = configuration.getProperty(
"service.r.ls_url");
-
logger.debug("LSRegistrationComponent.runAction: "
- + "register to LS [" + lsURL + "] with file "
- + "[" + maRRDConfigFile + "]");
+ + "register to LS: " + lsURL);

- ServiceLSRegistrator registrator =
- new GenericServiceLSRegistrator(
- new PropertiesServiceDescription(),
- new InformationXMLFileServiceContent(maRRDConfigFile));

+ String metadataConfigStore = "";
+ try {
+ metadataConfigStore =
+
configuration.getProperty(LSRegistrationComponent.MA_CONFIG_STORE);
+ } catch (PerfSONARException ex) {}
+
+ ServiceLSRegistrator registrator = null;
+
+ if (metadataConfigStore.equals("file")) {
+
+ String maRRDConfigFile =
+
configuration.getProperty(LSRegistrationComponent.MA_CONFIG_FILE);
+
+ logger.debug("LSRegistrationComponent.runAction: "
+ + "metadata config file to register to LS: "
+ + maRRDConfigFile);
+
+ registrator = new GenericServiceLSRegistrator(
+ new PropertiesServiceDescription(),
+ new
InformationXMLFileServiceContent(maRRDConfigFile));
+
+ } else {
+
+ registrator = new GenericServiceLSRegistrator(
+ new PropertiesServiceDescription(),
+ new InformationExistDbXmlrpcServiceContent());
+
+ logger.debug("LSRegistrationComponent.runAction: "
+ + "metadata configuration taken from xml database");
+ }
+
+
+
registrator.initRegistrator();

responseMessage = registrator.register(lsURL);




Archive powered by MHonArc 2.6.16.

Top of Page