perfsonar-dev - perfsonar: r2257 - in branches/JAVA-RRD-MA-STABLE/src: . org/perfsonar/commons/messages org/perfsonar/service/measurementArchive/metadataConfig org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator org/perfsonar/service/measurementArchive/rrdType org/perfsonar/service/measurementArchive/sqlType org/perfsonar/service/measurementArchive/sqlType/fetch
Subject: perfsonar development work
List archive
perfsonar: r2257 - in branches/JAVA-RRD-MA-STABLE/src: . org/perfsonar/commons/messages org/perfsonar/service/measurementArchive/metadataConfig org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator org/perfsonar/service/measurementArchive/rrdType org/perfsonar/service/measurementArchive/sqlType org/perfsonar/service/measurementArchive/sqlType/fetch
Chronological Thread
- From:
- To:
- Subject: perfsonar: r2257 - in branches/JAVA-RRD-MA-STABLE/src: . org/perfsonar/commons/messages org/perfsonar/service/measurementArchive/metadataConfig org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator org/perfsonar/service/measurementArchive/rrdType org/perfsonar/service/measurementArchive/sqlType org/perfsonar/service/measurementArchive/sqlType/fetch
- Date: Tue, 20 Mar 2007 09:01:22 -0400
Author: roman
Date: 2007-03-20 09:01:20 -0400 (Tue, 20 Mar 2007)
New Revision: 2257
Modified:
branches/JAVA-RRD-MA-STABLE/src/objects.config
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/EchoRequest.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/MetadataConfigurationStorageManager.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/Transformations.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGenerator.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGeneratorTMP.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/UtilizationQueryGenerator.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/rrdType/RRDTypeMAServiceEngine.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/SQLTypeMAServiceEngine.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/fetch/L2PathStatusResponseGenerator.java
Log:
merging
svn merge -r 2219:2256
https://svn.perfsonar.net/svn/perfsonar/trunk/perfsonar
Modified: branches/JAVA-RRD-MA-STABLE/src/objects.config
===================================================================
--- branches/JAVA-RRD-MA-STABLE/src/objects.config 2007-03-20 12:15:18
UTC (rev 2256)
+++ branches/JAVA-RRD-MA-STABLE/src/objects.config 2007-03-20 13:01:20
UTC (rev 2257)
@@ -101,11 +101,13 @@
http://ggf.org/ns/nmwg/topology/base/3.0/address/
org.ggf.ns.nmwg.topology.base.v3_0.Address
http://ggf.org/ns/nmwg/topology/base/3.0/operSys/
org.ggf.ns.nmwg.topology.base.v3_0.OperSys
http://ggf.org/ns/nmwg/topology/base/3.0/type/
org.ggf.ns.nmwg.topology.base.v3_0.Type
+http://ggf.org/ns/nmwg/topology/base/3.0/long/
org.ggf.ns.nmwg.topology.base.v3_0.Long
http://ggf.org/ns/nmwg/topology/base/3.0/longitude/
org.ggf.ns.nmwg.topology.base.v3_0.Longitude
http://ggf.org/ns/nmwg/topology/base/3.0/cpu/
org.ggf.ns.nmwg.topology.base.v3_0.Cpu
http://ggf.org/ns/nmwg/topology/base/3.0/ifDescription/
org.ggf.ns.nmwg.topology.base.v3_0.IfDescription
http://ggf.org/ns/nmwg/topology/base/3.0/floor/
org.ggf.ns.nmwg.topology.base.v3_0.Floor
http://ggf.org/ns/nmwg/topology/base/3.0/cage/
org.ggf.ns.nmwg.topology.base.v3_0.Cage
+http://ggf.org/ns/nmwg/topology/base/3.0/lat/
org.ggf.ns.nmwg.topology.base.v3_0.Lat
http://ggf.org/ns/nmwg/topology/base/3.0/latitude/
org.ggf.ns.nmwg.topology.base.v3_0.Latitude
http://ggf.org/ns/nmwg/topology/base/3.0/state/
org.ggf.ns.nmwg.topology.base.v3_0.State
http://ggf.org/ns/nmwg/topology/base/3.0/interface/
org.ggf.ns.nmwg.topology.base.v3_0.Interface
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/EchoRequest.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/EchoRequest.java
2007-03-20 12:15:18 UTC (rev 2256)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/EchoRequest.java
2007-03-20 13:01:20 UTC (rev 2257)
@@ -129,9 +129,9 @@
Message response = null;
- if (eventType.getEventType().equals(ECHO_NAMESPACE)) {
+ if (eventType.getEventType().trim().equals(ECHO_NAMESPACE)) {
response = executeSimpleEcho();
- } else if (eventType.getEventType().equals("")) {
+ } else if (eventType.getEventType().trim().equals("")) {
response = getEmptyEventTypeResponse();
} else {
response = serviceEngine.takeAction(getType(), request);
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/MetadataConfigurationStorageManager.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/MetadataConfigurationStorageManager.java
2007-03-20 12:15:18 UTC (rev 2256)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/MetadataConfigurationStorageManager.java
2007-03-20 13:01:20 UTC (rev 2257)
@@ -190,9 +190,9 @@
String[] tagNames = {"metadata", "data"};
Map elements =
transformations.transformResults(xmlResult, tagNames);
-
+
if (elements == null)
- throw new SystemException(
+ throw new SystemException(
"warning.ma.metadata_configuration",
"MetadataConfigurationStorageManager.fetch: "
+ "No metadata or data elements in the fetch result "
@@ -262,7 +262,7 @@
+ "</xu:modifications>";
logger.debug("RRDConfigurationStorageManagerdata.store: "
- + "XUpdate statement to store metadata element: \n"
+ + "XUpdate statement to store metadata element: \n"
+ metaXUpdate);
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/Transformations.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/Transformations.java
2007-03-20 12:15:18 UTC (rev 2256)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/Transformations.java
2007-03-20 13:01:20 UTC (rev 2257)
@@ -151,7 +151,7 @@
} catch (PerfSONARException pex) {
- throw new SystemException(pex.getResultCode(),
pex.getMessage());
+ throw new SystemException(pex.getResultCode(), pex.getMessage());
} catch (Exception ex) {
@@ -161,11 +161,11 @@
+ "from the request metadata. "
+ ex.toString());
throw new RequestException(
- "error.ma.query",
+ "error.ma.query",
"Unable to generate xquery statement "
+ "for the metadata configuration "
+ "from the request metadata. "
- + ex.toString());
+ + ex.toString());
}
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGenerator.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGenerator.java
2007-03-20 12:15:18 UTC (rev 2256)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGenerator.java
2007-03-20 13:01:20 UTC (rev 2257)
@@ -150,7 +150,7 @@
String linkGlobalName = "";
try {
- linkGlobalName = link.getGlobalNameElement().getGlobalName();
+ linkGlobalName =
link.getGlobalNameElement().getGlobalName().trim();
} catch (Exception ex) {
;
}
@@ -225,10 +225,10 @@
String node1City = "";
String node1Institution = "";
- try { node1Name =
nodeArray[0].getNameElement().getName(); } catch (Exception ex)
{;}
- try { node1Country =
nodeArray[0].getCountryElement().getCountry(); } catch (Exception ex)
{;}
- try { node1City =
nodeArray[0].getCityElement().getCity(); } catch (Exception ex)
{;}
- try { node1Institution =
nodeArray[0].getInstitutionElement().getInstitution(); } catch (Exception ex)
{;}
+ try { node1Name =
nodeArray[0].getNameElement().getName().trim(); } catch
(Exception ex) {;}
+ try { node1Country =
nodeArray[0].getCountryElement().getCountry().trim(); } catch
(Exception ex) {;}
+ try { node1City =
nodeArray[0].getCityElement().getCity().trim(); } catch
(Exception ex) {;}
+ try { node1Institution =
nodeArray[0].getInstitutionElement().getInstitution().trim(); } catch
(Exception ex) {;}
String node2Name = "";
@@ -236,10 +236,10 @@
String node2City = "";
String node2Institution = "";
- try { node2Name =
nodeArray[1].getNameElement().getName(); } catch (Exception ex)
{;}
- try { node2Country =
nodeArray[1].getCountryElement().getCountry(); } catch (Exception ex)
{;}
- try { node2City =
nodeArray[1].getCityElement().getCity(); } catch (Exception ex)
{;}
- try { node2Institution =
nodeArray[1].getInstitutionElement().getInstitution(); } catch (Exception ex)
{;}
+ try { node2Name =
nodeArray[1].getNameElement().getName().trim(); } catch
(Exception ex) {;}
+ try { node2Country =
nodeArray[1].getCountryElement().getCountry().trim(); } catch
(Exception ex) {;}
+ try { node2City =
nodeArray[1].getCityElement().getCity().trim(); } catch
(Exception ex) {;}
+ try { node2Institution =
nodeArray[1].getInstitutionElement().getInstitution().trim(); } catch
(Exception ex) {;}
@@ -259,7 +259,7 @@
+ "
\n"
+ " let $node1_id :=
\n"
+ " if ($node1_metadata) then
\n"
- + "
fn:data($node1_metadata/nmwg:subject/nmwgtopo3:node/@id) \n"
+ + "
fn:data($node1_metadata/nmwg:subject/nmwgtopo3:node/@id) \n"
+ " else
\n"
+ " ''
\n";
@@ -332,10 +332,10 @@
String nodeCity = "";
String nodeInstitution = "";
- try { nodeName =
nodeArray[0].getNameElement().getName(); } catch (Exception ex)
{;}
- try { nodeCountry =
nodeArray[0].getCountryElement().getCountry(); } catch (Exception ex)
{;}
- try { nodeCity =
nodeArray[0].getCityElement().getCity(); } catch (Exception ex)
{;}
- try { nodeInstitution =
nodeArray[0].getInstitutionElement().getInstitution(); } catch (Exception ex)
{;}
+ try { nodeName =
nodeArray[0].getNameElement().getName().trim(); } catch
(Exception ex) {;}
+ try { nodeCountry =
nodeArray[0].getCountryElement().getCountry().trim(); } catch
(Exception ex) {;}
+ try { nodeCity =
nodeArray[0].getCityElement().getCity().trim(); } catch
(Exception ex) {;}
+ try { nodeInstitution =
nodeArray[0].getInstitutionElement().getInstitution().trim(); } catch
(Exception ex) {;}
String node = null;
if (nodeName == "" && nodeCountry == "" && nodeCity == "" &&
nodeInstitution == "")
@@ -353,7 +353,7 @@
+ "
\n"
+ " let $node_id :=
\n"
+ " if ($node_metadata) then
\n"
- + "
fn:data($node_metadata/nmwg:subject/nmwgtopo3:node/@id) \n"
+ + "
fn:data($node_metadata/nmwg:subject/nmwgtopo3:node/@id) \n"
+ " else
\n"
+ " ''
\n";
xQuery = "
\n "
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGeneratorTMP.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGeneratorTMP.java
2007-03-20 12:15:18 UTC (rev 2256)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGeneratorTMP.java
2007-03-20 13:01:20 UTC (rev 2257)
@@ -153,7 +153,7 @@
String linkGlobalName = "";
try {
- linkGlobalName = link.getGlobalNameElement().getGlobalName();
+ linkGlobalName =
link.getGlobalNameElement().getGlobalName().trim();
} catch (Exception ex) {
;
}
@@ -228,10 +228,10 @@
String node1City = "";
String node1Institution = "";
- try { node1Name =
nodeArray[0].getNameElement().getName(); } catch (Exception ex)
{;}
- try { node1Country =
nodeArray[0].getCountryElement().getCountry(); } catch (Exception ex)
{;}
- try { node1City =
nodeArray[0].getCityElement().getCity(); } catch (Exception ex)
{;}
- try { node1Institution =
nodeArray[0].getInstitutionElement().getInstitution(); } catch (Exception ex)
{;}
+ try { node1Name =
nodeArray[0].getNameElement().getName().trim(); } catch
(Exception ex) {;}
+ try { node1Country =
nodeArray[0].getCountryElement().getCountry().trim(); } catch
(Exception ex) {;}
+ try { node1City =
nodeArray[0].getCityElement().getCity().trim(); } catch
(Exception ex) {;}
+ try { node1Institution =
nodeArray[0].getInstitutionElement().getInstitution().trim(); } catch
(Exception ex) {;}
String node2Name = "";
@@ -239,10 +239,10 @@
String node2City = "";
String node2Institution = "";
- try { node2Name =
nodeArray[1].getNameElement().getName(); } catch (Exception ex)
{;}
- try { node2Country =
nodeArray[1].getCountryElement().getCountry(); } catch (Exception ex)
{;}
- try { node2City =
nodeArray[1].getCityElement().getCity(); } catch (Exception ex)
{;}
- try { node2Institution =
nodeArray[1].getInstitutionElement().getInstitution(); } catch (Exception ex)
{;}
+ try { node2Name =
nodeArray[1].getNameElement().getName().trim(); } catch
(Exception ex) {;}
+ try { node2Country =
nodeArray[1].getCountryElement().getCountry().trim(); } catch
(Exception ex) {;}
+ try { node2City =
nodeArray[1].getCityElement().getCity().trim(); } catch
(Exception ex) {;}
+ try { node2Institution =
nodeArray[1].getInstitutionElement().getInstitution().trim(); } catch
(Exception ex) {;}
@@ -262,7 +262,7 @@
+ "
\n"
+ " let $node1_id :=
\n"
+ " if ($node1_metadata) then
\n"
- + "
fn:data($node1_metadata/nmwg:subject/nmwgtopo3:node/@id) \n"
+ + "
fn:data($node1_metadata/nmwg:subject/nmwgtopo3:node/@id) \n"
+ " else
\n"
+ " ''
\n";
@@ -335,10 +335,10 @@
String nodeCity = "";
String nodeInstitution = "";
- try { nodeName =
nodeArray[0].getNameElement().getName(); } catch (Exception ex)
{;}
- try { nodeCountry =
nodeArray[0].getCountryElement().getCountry(); } catch (Exception ex)
{;}
- try { nodeCity =
nodeArray[0].getCityElement().getCity(); } catch (Exception ex)
{;}
- try { nodeInstitution =
nodeArray[0].getInstitutionElement().getInstitution(); } catch (Exception ex)
{;}
+ try { nodeName =
nodeArray[0].getNameElement().getName().trim(); } catch
(Exception ex) {;}
+ try { nodeCountry =
nodeArray[0].getCountryElement().getCountry().trim(); } catch
(Exception ex) {;}
+ try { nodeCity =
nodeArray[0].getCityElement().getCity().trim(); } catch
(Exception ex) {;}
+ try { nodeInstitution =
nodeArray[0].getInstitutionElement().getInstitution().trim(); } catch
(Exception ex) {;}
String node = null;
if (nodeName == "" && nodeCountry == "" && nodeCity == "" &&
nodeInstitution == "")
@@ -356,7 +356,7 @@
+ "
\n"
+ " let $node_id :=
\n"
+ " if ($node_metadata) then
\n"
- + "
fn:data($node_metadata/nmwg:subject/nmwgtopo3:node/@id) \n"
+ + "
fn:data($node_metadata/nmwg:subject/nmwgtopo3:node/@id) \n"
+ " else
\n"
+ " ''
\n";
xQuery = "
\n "
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/UtilizationQueryGenerator.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/UtilizationQueryGenerator.java
2007-03-20 12:15:18 UTC (rev 2256)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/UtilizationQueryGenerator.java
2007-03-20 13:01:20 UTC (rev 2257)
@@ -77,14 +77,6 @@
//logger.debug("UtilizationQueryGenerator.getMetadataQuery: "
// + "start getMetadataQuery");
-
- if (query == null)
- throw new SystemException(
- "error.ma.query",
- "UtilizationQueryGenerator.getMetadataQuery: "
- + "Input message is null");
-
-
String eventType = "";
String ipAddress = "";
String hostName = "";
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/rrdType/RRDTypeMAServiceEngine.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/rrdType/RRDTypeMAServiceEngine.java
2007-03-20 12:15:18 UTC (rev 2256)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/rrdType/RRDTypeMAServiceEngine.java
2007-03-20 13:01:20 UTC (rev 2257)
@@ -244,7 +244,7 @@
} else if (actionType.equals(ActionType.ECHO)) {
- response = getEcho(request);
+ response = getEcho(request);
} else {
@@ -278,17 +278,17 @@
public static String getSeq() {
- String strSeq = null;
- try {
- seq = seq + 1;
- strSeq = Long.toString(seq);
- } catch (Exception ex) {
- strSeq = "0";
- seq = 0;
- }
-
- return strSeq;
+ String strSeq = null;
+ try {
+ seq = seq + 1;
+ strSeq = Long.toString(seq);
+ } catch (Exception ex) {
+ strSeq = "0";
+ seq = 0;
+ }
+ return strSeq;
+
}
@@ -327,11 +327,11 @@
try {
- _getKey(metadata, null, metadataMap, message, metadataConfig);
+ _getKey(metadata, null, metadataMap, message,
metadataConfig);
} catch (NullPointerException npex) {
- throw new RequestException(
+ throw new RequestException(
"error.ma.query",
"RRDTypeMAServiceEngine.getKey: "
+ "getting the key is impossible "
@@ -602,11 +602,11 @@
Key key = null;
try {
- key = getStoreKey(meta);
+ key = getStoreKey(meta);
} catch (NullPointerException npex) {
- throw new RequestException(
+ throw new RequestException(
"error.ma.query",
"RRDTypeMAServiceEngine.storeData: "
+ "getting the store key is impossible "
@@ -825,18 +825,18 @@
protected Message getEcho(Message request) {
- Message response = new Message();
+ Message response = new Message();
- PerfSONARException pex =
- new PerfSONARException(
- "error.request",
- "This eventType in echo request is not
supported");
+ PerfSONARException pex =
+ new PerfSONARException(
+ "error.request",
+ "This eventType in echo request is not supported");
- // this method will be used for advanced types of echo request
+ // this method will be used for advanced types of echo request
- ResultCodesUtil.createResultCodeMetadata(response, pex);
+ ResultCodesUtil.createResultCodeMetadata(response, pex);
- return response;
+ return response;
}
@@ -852,13 +852,13 @@
try {
eventType = metadata.getEventType().getEventType();
} catch (Exception ex1) {
- ;
+ ;
}
for (Object d : msg.getDataMap().values()) {
Key key = ((Data)d).getKey();
if (key.getParameters().getParameterMap().get("eventType") ==
null)
- key.addParameter("eventType", eventType);
+ key.addParameter("eventType", eventType);
}
return eventType;
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/SQLTypeMAServiceEngine.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/SQLTypeMAServiceEngine.java
2007-03-20 12:15:18 UTC (rev 2256)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/SQLTypeMAServiceEngine.java
2007-03-20 13:01:20 UTC (rev 2257)
@@ -12,6 +12,7 @@
import org.ggf.ns.nmwg.base.v2_0.Message;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
+import org.ggf.ns.nmwg.base.v2_0.EventType;
import org.ggf.ns.nmwg.base.v2_0.Data;
import org.ggf.ns.nmwg.base.v2_0.Datum;
import org.ggf.ns.nmwg.base.v2_0.Key;
@@ -207,14 +208,14 @@
Parameter ibatisConfig = key.getParameterByName("ibatisConfig");
if (ibatisConfig == null)
throw new RequestException(
- "error.ma.sql.db_connection.ibatis",
+ "error.ma.query",
"SQLTypeMAServiceEngine.getStoreKey: "
+ "No ibatisConfig parameter in the key");
Parameter eventType = key.getParameterByName("eventType");
if (eventType == null)
- throw new RequestException(
- "error.ma.sql.db_connection.ibatis",
+ throw new RequestException(
+ "error.ma.query",
"SQLTypeMAServiceEngine.getStoreKey: "
+ "No eventType parameter in the key");
@@ -222,25 +223,31 @@
// no key in the request
- String eventType =
metadata.getEventType().getEventType().trim();
- if (eventType.equals(""))
- throw new
RequestException("error.ma.sql.db_connection.ibatis",
- "SQLTypeMAServiceEngine.getStoreKey: "
+ EventType eventTypeObj = metadata.getEventType();
+ if (eventTypeObj == null)
+ throw new RequestException("error.ma.query",
+ "SQLTypeMAServiceEngine.getStoreKey: "
+ "No eventType in the request metadata");
-
+
+ String eventType = eventTypeObj.getEventType().trim();
+ if (eventType.equals(""))
+ throw new RequestException("error.ma.query",
+ "SQLTypeMAServiceEngine.getStoreKey: "
+ + "eventType in the request metadata is empty");
+
Message query = new Message();
query.addChild(metadata);
Message resp = null;
try{
- resp = metadataConfig.fetch(query);
+ resp = metadataConfig.fetch(query);
} catch (SystemException sex) {
- if
(sex.getResultCode().equals("warning.ma.metadata_configuration"))
- resp = new Message();
- else
- throw new SystemException(
- sex.getResultCode(),
- sex.getResultDescription());
+ if
(sex.getResultCode().equals("warning.ma.metadata_configuration"))
+ resp = new Message();
+ else
+ throw new SystemException(
+ sex.getResultCode(),
+ sex.getResultDescription());
}
if (resp.getDataMap().size() > 0) {
@@ -250,30 +257,30 @@
Data d = (resp.getDataArray())[0];
Key k = d.getKey();
key = k;
-
+
if (key.getParameterByName("eventType") == null)
- key.addParameter("eventType", eventType);
+ key.addParameter("eventType", eventType);
} else {
// metadata does not exist in xmldb
// getting default ibatis parameter from service.properties
- String ibatis_config_str = "";
- try {
- ibatis_config_str =
-
configuration.getProperty("service.ma.sql.default_ibatis_config");
- } catch (Exception ex) {
- ibatis_config_str = "";
- }
+ String ibatis_config_str = "";
+ try {
+ ibatis_config_str =
+
configuration.getProperty("service.ma.sql.default_ibatis_config");
+ } catch (Exception ex) {
+ ibatis_config_str = "";
+ }
Parameter ibatisConfig = null;
if (!ibatis_config_str.trim().equals("")) {
- ibatisConfig = new Parameter();
- ibatisConfig.setParameterName("ibatisConfig");
+ ibatisConfig = new Parameter();
+ ibatisConfig.setParameterName("ibatisConfig");
- ibatisConfig.setParameterValue(ibatis_config_str);
+ ibatisConfig.setParameterValue(ibatis_config_str);
}
Key k = new Key();
@@ -283,19 +290,20 @@
Parameters params = metadata.getParameters();
if (params == null)
- params = new Parameters();
+ params = new Parameters();
if (ibatisConfig != null) {
- params.getParameterMap().remove("ibatisConfig");
- params.addChild(ibatisConfig);
+ params.getParameterMap().remove("ibatisConfig");
+ params.addChild(ibatisConfig);
+
}
if (params.getParameterByName("ibatisConfig") == null) {
- logger.error("SQLTypeMAServiceEngine.getStoreKey: "
- + "No default ibatis property in the
key");
- throw new RequestException(
+ logger.error("SQLTypeMAServiceEngine.getStoreKey: "
+ + "No default ibatis property in the key");
+ throw new RequestException(
"error.ma.sql.db_connection.ibatis",
"SQLTypeMAServiceEngine.getStoreKey: "
+ "No default ibatis property "
@@ -328,8 +336,8 @@
configMessage.addChild(dk);
//logger.debug("SQLTypeMAServiceEngine.getStoreKey: "
- // + "metadataConfig message: "
- // + configMessage.toString());
+ // + "metadataConfig message: "
+ // + configMessage.toString());
metadataConfig.store(configMessage);
@@ -343,4 +351,4 @@
-} //SQLTypeMAServiceEngine
+} //SQLTypeMAServiceEngine
\ No newline at end of file
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/fetch/L2PathStatusResponseGenerator.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/fetch/L2PathStatusResponseGenerator.java
2007-03-20 12:15:18 UTC (rev 2256)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/fetch/L2PathStatusResponseGenerator.java
2007-03-20 13:01:20 UTC (rev 2257)
@@ -50,7 +50,6 @@
Data data = new Data();
- // if there is data in the database
for (int i = 0; i < resultList.size(); i++) {
Datum datum = new Datum();
@@ -104,7 +103,7 @@
}
//logger.debug("SQLStorageManager.fetch: "
- // + "column: " + column + ", value: " + strValue );
+ // + "column: " + column + ", value: " + strValue);
}
@@ -115,24 +114,6 @@
}
- // when there is no data in the database
- if (resultList.size() == 0) {
-
- Datum datum = new Datum();
-
- StateOper stateOper = new StateOper();
- stateOper.setStateOper("UNKNOWN");
- datum.addChild(stateOper);
-
- StateAdmin stateAdmin = new StateAdmin();
- stateAdmin.setStateAdmin("UNKNOWN");
- datum.addChild(stateAdmin);
-
- data.addChild(datum);
-
- }
-
-
return data;
}
- perfsonar: r2257 - in branches/JAVA-RRD-MA-STABLE/src: . org/perfsonar/commons/messages org/perfsonar/service/measurementArchive/metadataConfig org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator org/perfsonar/service/measurementArchive/rrdType org/perfsonar/service/measurementArchive/sqlType org/perfsonar/service/measurementArchive/sqlType/fetch, svnlog, 03/20/2007
Archive powered by MHonArc 2.6.16.