perfsonar-dev - perfsonar: r4024 - trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration
Subject: perfsonar development work
List archive
perfsonar: r4024 - trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration
Chronological Thread
- From:
- To:
- Subject: perfsonar: r4024 - trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration
- Date: Thu, 19 Jun 2008 08:37:36 -0400
Author: mac
Date: 2008-06-19 08:37:35 -0400 (Thu, 19 Jun 2008)
New Revision: 4024
Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/LSSummaryServiceContent.java
Log:
New namespaces
More verbose error logs.
Throws exception when any of three summary xqueries fails.
Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/LSSummaryServiceContent.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/LSSummaryServiceContent.java
2008-06-18 16:03:14 UTC (rev 4023)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/LSSummaryServiceContent.java
2008-06-19 12:37:35 UTC (rev 4024)
@@ -28,8 +28,8 @@
private static final String XMLNS_DEF =
" xmlns:nmwg=\"http://ggf.org/ns/nmwg/base/2.0/\" "+
- "
xmlns:nmtb=\"http://ogf.org/schema/network/topology/base/20070707/\" " +
- "
xmlns:nmtl3=\"http://ogf.org/schema/network/topology/l3/20070707/\" " +
+ "
xmlns:nmtb=\"http://ogf.org/schema/network/topology/base/20070828/\" " +
+ "
xmlns:nmtl3=\"http://ogf.org/schema/network/topology/l3/20070828/\" " +
"
xmlns:summary=\"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/summarization/2.0/\"
";
private LoggerComponent logger;
@@ -212,7 +212,7 @@
* store it in Map<String, ServiceSummary>
* @return
*/
- private Map<String, ServiceSummary> getAllServicesSummaries() {
+ private Map<String, ServiceSummary> getAllServicesSummaries() throws
PerfSONARException {
Map<String, ServiceSummary> summaries = new HashMap<String,
ServiceSummary>();
@@ -279,23 +279,26 @@
* @param xq
* @return
*/
- private String[] xquery(String xq) {
+ private String[] xquery(String xq) throws PerfSONARException{
try {
String[] s = (String[]) storage.fetch(xq);
return s;
} catch (Exception e) {
- logger.error("LSSummaryServiceContent: Cannot perform xquery:
"+e.getMessage());
+ logger.error("LSSummaryServiceContent: Cannot perform xquery
["+xq+"]: "+e.getMessage()+"\n"+e.toString());
+ if (e instanceof PerfSONARException) throw (PerfSONARException)e;
+ else
+ throw new
PerfSONARException("error.lsregistration.db_error", "Cannot perform xquery
["+xq+"] : "+e.getLocalizedMessage());
}
- return new String[0];
+
}
/**
* Return set of IP addresses used by services
* @return
*/
- private String[] queryIpResults() {
+ private String[] queryIpResults() throws PerfSONARException {
String xq =
" declare namespace nmwg=\"http://ggf.org/ns/nmwg/base/2.0/\"; \n"+
@@ -311,7 +314,7 @@
* Return set of domains used by services
* @return
*/
- private String[] queryDomainResults() {
+ private String[] queryDomainResults() throws PerfSONARException {
String xq =
" declare namespace nmwg=\"http://ggf.org/ns/nmwg/base/2.0/\";
\n"+
@@ -327,7 +330,7 @@
* Return set of eventTypes used by services
* @return
*/
- private String[] queryEventTypeResults() {
+ private String[] queryEventTypeResults() throws PerfSONARException {
String xq =
" declare namespace nmwg=\"http://ggf.org/ns/nmwg/base/2.0/\";
\n"+
- perfsonar: r4024 - trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration, svnlog, 06/19/2008
Archive powered by MHonArc 2.6.16.