perfsonar-dev - perfsonar: r2408 - in branches/JAVA-RRD-MA-STABLE: ant/rrdma conf doc/ma/rrdTypeMA schema/example-instances/perfSONAR src/org/perfsonar/client/commons/requests src/org/perfsonar/client/commons/requests/lookupService src/org/perfsonar/commons/auxiliary src/org/perfsonar/commons/auxiliary/components/configuration src/org/perfsonar/commons/auxiliary/components/configuration/properties src/org/perfsonar/commons/auxiliary/components/mapping src/org/perfsonar/commons/auxiliary/components/scheduler src/org/perfsonar/commons/auxiliary/components/scheduler/actions src/org/perfsonar/commons/auxiliary/components/simplescheduler src/org/perfsonar/commons/container/listeners src/org/perfsonar/commons/messages src/org/perfsonar/commons/util src/org/perfsonar/service/commons/authn src/org/perfsonar/service/commons/authn/tokens src/org/perfsonar/service/commons/engine src/org/perfsonar/service/commons/exceptions src/org/perfsonar/service/commons/measurementExecutor src/org/perfsonar /service/commons/registration src/org/perfsonar/service/commons/storage src/org/perfsonar/service/commons/storage/xmldb src/org/perfsonar/service/commons/storage/xmldb/exist src/org/perfsonar/service/commons/storage/xmldb/exist/rest src/org/perfsonar/service/commons/storage/xmldb/exist/xmlrpc src/org/perfsonar/service/commons/storage/xmlfile src/org/perfsonar/service/measurementArchive/eventTypeConfig src/org/perfsonar/service/measurementArchive/metadataConfig src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator src/org/perfsonar/service/measurementArchive/register src/org/perfsonar/service/measurementArchive/rrdType src/org/perfsonar/service/measurementArchive/sqlType src/org/perfsonar/service/measurementArchive/sqlType/fetch src/org/perfsonar/service/measurementArchive/sqlType/store src/org/perfsonar/service/testHarness src/org/perfsonar/service/web
Subject: perfsonar development work
List archive
perfsonar: r2408 - in branches/JAVA-RRD-MA-STABLE: ant/rrdma conf doc/ma/rrdTypeMA schema/example-instances/perfSONAR src/org/perfsonar/client/commons/requests src/org/perfsonar/client/commons/requests/lookupService src/org/perfsonar/commons/auxiliary src/org/perfsonar/commons/auxiliary/components/configuration src/org/perfsonar/commons/auxiliary/components/configuration/properties src/org/perfsonar/commons/auxiliary/components/mapping src/org/perfsonar/commons/auxiliary/components/scheduler src/org/perfsonar/commons/auxiliary/components/scheduler/actions src/org/perfsonar/commons/auxiliary/components/simplescheduler src/org/perfsonar/commons/container/listeners src/org/perfsonar/commons/messages src/org/perfsonar/commons/util src/org/perfsonar/service/commons/authn src/org/perfsonar/service/commons/authn/tokens src/org/perfsonar/service/commons/engine src/org/perfsonar/service/commons/exceptions src/org/perfsonar/service/commons/measurementExecutor src/org/perfsonar /service/commons/registration src/org/perfsonar/service/commons/storage src/org/perfsonar/service/commons/storage/xmldb src/org/perfsonar/service/commons/storage/xmldb/exist src/org/perfsonar/service/commons/storage/xmldb/exist/rest src/org/perfsonar/service/commons/storage/xmldb/exist/xmlrpc src/org/perfsonar/service/commons/storage/xmlfile src/org/perfsonar/service/measurementArchive/eventTypeConfig src/org/perfsonar/service/measurementArchive/metadataConfig src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator src/org/perfsonar/service/measurementArchive/register src/org/perfsonar/service/measurementArchive/rrdType src/org/perfsonar/service/measurementArchive/sqlType src/org/perfsonar/service/measurementArchive/sqlType/fetch src/org/perfsonar/service/measurementArchive/sqlType/store src/org/perfsonar/service/testHarness src/org/perfsonar/service/web
Chronological Thread
- From:
- To:
- Subject: perfsonar: r2408 - in branches/JAVA-RRD-MA-STABLE: ant/rrdma conf doc/ma/rrdTypeMA schema/example-instances/perfSONAR src/org/perfsonar/client/commons/requests src/org/perfsonar/client/commons/requests/lookupService src/org/perfsonar/commons/auxiliary src/org/perfsonar/commons/auxiliary/components/configuration src/org/perfsonar/commons/auxiliary/components/configuration/properties src/org/perfsonar/commons/auxiliary/components/mapping src/org/perfsonar/commons/auxiliary/components/scheduler src/org/perfsonar/commons/auxiliary/components/scheduler/actions src/org/perfsonar/commons/auxiliary/components/simplescheduler src/org/perfsonar/commons/container/listeners src/org/perfsonar/commons/messages src/org/perfsonar/commons/util src/org/perfsonar/service/commons/authn src/org/perfsonar/service/commons/authn/tokens src/org/perfsonar/service/commons/engine src/org/perfsonar/service/commons/exceptions src/org/perfsonar/service/commons/measurementExecutor src/org/perfsonar /service/commons/registration src/org/perfsonar/service/commons/storage src/org/perfsonar/service/commons/storage/xmldb src/org/perfsonar/service/commons/storage/xmldb/exist src/org/perfsonar/service/commons/storage/xmldb/exist/rest src/org/perfsonar/service/commons/storage/xmldb/exist/xmlrpc src/org/perfsonar/service/commons/storage/xmlfile src/org/perfsonar/service/measurementArchive/eventTypeConfig src/org/perfsonar/service/measurementArchive/metadataConfig src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator src/org/perfsonar/service/measurementArchive/register src/org/perfsonar/service/measurementArchive/rrdType src/org/perfsonar/service/measurementArchive/sqlType src/org/perfsonar/service/measurementArchive/sqlType/fetch src/org/perfsonar/service/measurementArchive/sqlType/store src/org/perfsonar/service/testHarness src/org/perfsonar/service/web
- Date: Mon, 21 May 2007 10:50:26 -0400
Author: roman
Date: 2007-05-21 10:50:25 -0400 (Mon, 21 May 2007)
New Revision: 2408
Added:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/rrdType/BaseChainingMergerFactory.java
Modified:
branches/JAVA-RRD-MA-STABLE/ant/rrdma/rrdma-pre-install-targets.xml
branches/JAVA-RRD-MA-STABLE/conf/eventType-map.xml
branches/JAVA-RRD-MA-STABLE/conf/eventType-rules.xml
branches/JAVA-RRD-MA-STABLE/conf/log4j.properties.template
branches/JAVA-RRD-MA-STABLE/conf/rrd-database_TEST.xml
branches/JAVA-RRD-MA-STABLE/doc/ma/rrdTypeMA/ChangeLog.txt
branches/JAVA-RRD-MA-STABLE/schema/example-instances/perfSONAR/MeasurementArchiveStoreRequest-1.xml
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/client/commons/requests/RequestGenerator.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/client/commons/requests/lookupService/LSRegisterRequestGenerator.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/AuxiliaryComponent.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/AuxiliaryComponentManager.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/AuxiliaryThreadedComponent.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/ComponentsConfigurationReader.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/components/configuration/ConfigurationComponent.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/components/configuration/properties/PropertiesConfigurationComponent.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/components/mapping/ExpressionMapping.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/components/scheduler/ScheduleMessageHandler.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/components/scheduler/ScheduleMessageParser.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/components/scheduler/Scheduler.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/components/scheduler/actions/SchedulerAction.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/components/simplescheduler/Scheduler.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/container/listeners/StartupInitializer.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/BaseChaining.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/DataRequest.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/EchoRequest.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/LSCleanupRequest.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/LSDeregisterRequest.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/LSKeepaliveRequest.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/LSQueryRequest.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/LSRegisterRequest.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/LSRequest.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/LookupInfoRequest.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/MeasurementArchiveStoreRequest.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/MeasurementRequest.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/MessageHandler.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/MessageHandlerFactory.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/MetadataKeyRequest.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/Request.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/SetupDataRequest.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/SubscriptionKeepaliveRequest.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/SubscriptionRequest.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/TOPSRequest.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/UnSubscriptionRequest.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/util/MathUtil.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/util/TimeDateUtil.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/util/XMLUtils.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/authn/AADispatchProtocolFactory.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/authn/AADispatchSOAPProtocol.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/authn/tokens/SecTokenManager.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/authn/tokens/SecTokenManagerFactory.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/authn/tokens/SecTokenSOAPManager.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/authn/tokens/SecurityToken.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/engine/ServiceEngine.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/engine/ServiceEngineFactory.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/exceptions/AuthenticationException.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/exceptions/DataFormatException.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/exceptions/RequestException.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/exceptions/ResourceException.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/exceptions/SystemException.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/measurementExecutor/MeasurementExecutor.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/registration/GenericServiceLSRegistrator.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/registration/LSRegistrationComponent.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/DataRepository.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/GenericXmlStorageManager.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/NMWGStorageManager.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/StorageManager.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmldb/XmlDbDataRepository.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmldb/exist/ExistDbFactory.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmldb/exist/ExistDbGenericStorageManager.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmldb/exist/rest/ExistDbHttpXmlDataRepository.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmldb/exist/rest/ExistDbHttpXmlStorageManager.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmldb/exist/xmlrpc/ExistDbXmlrpcXmlDataRepository.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmldb/exist/xmlrpc/ExistDbXmlrpcXmlStorageManager.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmlfile/XmlFileDataRepository.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmlfile/XmlFileStorageManager.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/eventTypeConfig/EventType.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/eventTypeConfig/EventTypeConfiguration.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/eventTypeConfig/EventTypeConfigurationComponent.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/SimpleMetadataConfigurationStorageManager.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/MetadataQueryGenerator.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/MetadataQueryGeneratorFactory.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/OwampQueryGenerator.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/register/LSRegistrationComponent.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/rrdType/NMWGInterfaceBaseChaining.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/rrdType/RRDStorageManager.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/SQLStorageManager.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
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/fetch/OwampResponseGenerator.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/fetch/ResponseGenerator.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/fetch/ResponseGeneratorFactory.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/fetch/UtilizationResponseGenerator.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/store/L2PathStatusStoreRequestProcess.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/store/OwampStoreRequestProcess.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/store/StoreRequestProcess.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/store/StoreRequestProcessFactory.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/store/UtilizationStoreRequestProcess.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/testHarness/RRDStorageManagerTester.java
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/web/RequestHandler.java
Log:
merging
command: svn merge -r 2367:2406
https://svn.perfsonar.net/svn/perfsonar/trunk/perfsonar
Modified: branches/JAVA-RRD-MA-STABLE/ant/rrdma/rrdma-pre-install-targets.xml
===================================================================
--- branches/JAVA-RRD-MA-STABLE/ant/rrdma/rrdma-pre-install-targets.xml
2007-05-21 14:47:44 UTC (rev 2407)
+++ branches/JAVA-RRD-MA-STABLE/ant/rrdma/rrdma-pre-install-targets.xml
2007-05-21 14:50:25 UTC (rev 2408)
@@ -18,12 +18,12 @@
- <!-- properties -->
+ <!-- properties -->
- <property name="service.base.name" value="RRD-MA" />
- <property name="service.version" value="2.1" />
- <property name="service.version.candidate" value="-beta" />
+ <property name="service.base.name" value="RRD-MA" />
+ <property name="service.version" value="2.2" />
+ <property name="service.version.candidate" value="-beta" />
<property name="service.name"
value="perfSONAR-${service.base.name}-${service.version}${service.version.candidate}"
/>
@@ -124,7 +124,7 @@
<target name="rrdjtool-call-for-linux64"
depends="rrdjtool-call"
if="linux64.os.platform">
-
+
<antcall target="get-rrdjtool-home" />
<antcall target="get-java-path-for-rrdjtool" />
@@ -221,7 +221,7 @@
<entry key="component.ma.xmldb.db_username"
value="rrdmaservice"/>
<entry key="component.ma.xmldb.db_password"
value="rrdmaservice"/>
- </propertyfile>
+ </propertyfile>
</target>
@@ -261,7 +261,7 @@
<target name="exist-war-question"
depends="_exist-war-question"
if="exist.war.install.decision">
-
+
<input message="Do you want me to download eXist web application
package (if not you have to do it manually)? "
addproperty="exist.war.install.type.decision"
validargs="y,n"
@@ -543,7 +543,7 @@
<propertyfile file="conf/service.properties"
comment="This file was created by the Ant configuration script.">
-
+
<entry key="component.ma.xmldb.db_username"
value="${_exist.username}"/>
<entry key="component.ma.xmldb.db_password"
value="${_exist.password}"/>
Modified: branches/JAVA-RRD-MA-STABLE/conf/eventType-map.xml
===================================================================
--- branches/JAVA-RRD-MA-STABLE/conf/eventType-map.xml 2007-05-21 14:47:44
UTC (rev 2407)
+++ branches/JAVA-RRD-MA-STABLE/conf/eventType-map.xml 2007-05-21 14:50:25
UTC (rev 2408)
@@ -12,6 +12,7 @@
<metadataQueryGenerator>org.perfsonar.service.measurementArchive.metadataConfig.queryGenerator.UtilizationQueryGenerator</metadataQueryGenerator>
<responseGenerator>org.perfsonar.service.measurementArchive.sqlType.fetch.UtilizationResponseGenerator</responseGenerator>
<storeRequestProcess>org.perfsonar.service.measurementArchive.sqlType.store.UtilizationStoreRequestProcess</storeRequestProcess>
+
<baseChainingMerger>org.perfsonar.service.measurementArchive.rrdType.NMWGInterfaceBaseChaining</baseChainingMerger>
</eventType>
<eventType>
Modified: branches/JAVA-RRD-MA-STABLE/conf/eventType-rules.xml
===================================================================
--- branches/JAVA-RRD-MA-STABLE/conf/eventType-rules.xml 2007-05-21
14:47:44 UTC (rev 2407)
+++ branches/JAVA-RRD-MA-STABLE/conf/eventType-rules.xml 2007-05-21
14:50:25 UTC (rev 2408)
@@ -22,6 +22,8 @@
paramcount="0" />
<call-method-rule pattern="storeRequestProcess"
methodname="setStoreRequestProcess"
paramcount="0" />
+ <call-method-rule pattern="baseChainingMerger"
methodname="setBaseChainingMerger"
+ paramcount="0" />
<set-next-rule methodname="setEventType" />
</pattern>
Modified: branches/JAVA-RRD-MA-STABLE/conf/log4j.properties.template
===================================================================
--- branches/JAVA-RRD-MA-STABLE/conf/log4j.properties.template 2007-05-21
14:47:44 UTC (rev 2407)
+++ branches/JAVA-RRD-MA-STABLE/conf/log4j.properties.template 2007-05-21
14:50:25 UTC (rev 2408)
@@ -8,7 +8,7 @@
#ROOT
-#log4j.appender.rootAppender.MaxBackupIndex=1000
+#log4j.appender.rootAppender.MaxBackupIndex=11
#log4j.appender.rootAppender.File=_LOGPATH_/perfsonar.log
#log4j.appender.rootAppender.layout=org.apache.log4j.PatternLayout
#log4j.appender.rootAppender.layout.ConversionPattern=%d %5p - %m%n
@@ -17,7 +17,7 @@
#log4j.appender.rootAppender=org.apache.log4j.RollingFileAppender
#DEBUG
-log4j.appender.debugAppender.MaxBackupIndex=1000
+log4j.appender.debugAppender.MaxBackupIndex=11
log4j.appender.debugAppender.File=_LOGPATH_/perfsonar_debug.log
log4j.appender.debugAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.debugAppender.layout.ConversionPattern=%d %5p - %m%n
@@ -26,7 +26,7 @@
log4j.appender.debugAppender=org.apache.log4j.RollingFileAppender
#INFO
-log4j.appender.infoAppender.MaxBackupIndex=1000
+log4j.appender.infoAppender.MaxBackupIndex=11
log4j.appender.infoAppender.File=_LOGPATH_/perfsonar_info.log
log4j.appender.infoAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.infoAppender.layout.ConversionPattern=%d %5p - %m%n
@@ -35,7 +35,7 @@
log4j.appender.infoAppender=org.apache.log4j.RollingFileAppender
#WARN
-log4j.appender.warnAppender.MaxBackupIndex=1000
+log4j.appender.warnAppender.MaxBackupIndex=11
log4j.appender.warnAppender.File=_LOGPATH_/perfsonar_warn.log
log4j.appender.warnAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.warnAppender.layout.ConversionPattern=%d %5p - %m%n
@@ -44,7 +44,7 @@
log4j.appender.warnAppender=org.apache.log4j.RollingFileAppender
#ERROR
-log4j.appender.errorAppender.MaxBackupIndex=1000
+log4j.appender.errorAppender.MaxBackupIndex=11
log4j.appender.errorAppender.File=_LOGPATH_/perfsonar_error.log
log4j.appender.errorAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.errorAppender.layout.ConversionPattern=%d %5p - %m%n
@@ -53,7 +53,7 @@
log4j.appender.errorAppender=org.apache.log4j.RollingFileAppender
#FATAL
-log4j.appender.fatalAppender.MaxBackupIndex=1000
+log4j.appender.fatalAppender.MaxBackupIndex=11
log4j.appender.fatalAppender.File=_LOGPATH_/perfsonar_fatal.log
log4j.appender.fatalAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.fatalAppender.layout.ConversionPattern=%d %5p - %m%n
Modified: branches/JAVA-RRD-MA-STABLE/conf/rrd-database_TEST.xml
===================================================================
--- branches/JAVA-RRD-MA-STABLE/conf/rrd-database_TEST.xml 2007-05-21
14:47:44 UTC (rev 2407)
+++ branches/JAVA-RRD-MA-STABLE/conf/rrd-database_TEST.xml 2007-05-21
14:50:25 UTC (rev 2408)
@@ -30,6 +30,13 @@
<nmwg:parameter
name="file">__BASEPATH__/data/rrd/test/test.rrd</nmwg:parameter>
<nmwg:parameter name="dataSource">bytes</nmwg:parameter>
<nmwg:parameter name="valueUnits">Bps</nmwg:parameter>
+
+ <!-- those below are optional parameters describing rrd
file-->
+ <nmwg:parameter name="dataSourceStep">300</nmwg:parameter>
+ <nmwg:parameter
name="dataSourceType">ABSOLUTE</nmwg:parameter>
+ <nmwg:parameter
name="dataSourceHeartbeat">400</nmwg:parameter>
+ <nmwg:parameter name="dataSourceMinValue">0</nmwg:parameter>
+ <nmwg:parameter
name="dataSourceMaxValue">10000000</nmwg:parameter>
</nmwg:parameters>
</nmwg:key>
</nmwg:data>
@@ -60,6 +67,13 @@
<nmwg:parameter
name="file">__BASEPATH__/data/rrd/test/test.rrd</nmwg:parameter>
<nmwg:parameter name="dataSource">pkts</nmwg:parameter>
<nmwg:parameter name="valueUnits">Bps</nmwg:parameter>
+
+ <!-- those below are optional parameters describing rrd
file-->
+ <nmwg:parameter name="dataSourceStep">300</nmwg:parameter>
+ <nmwg:parameter
name="dataSourceType">ABSOLUTE</nmwg:parameter>
+ <nmwg:parameter
name="dataSourceHeartbeat">400</nmwg:parameter>
+ <nmwg:parameter name="dataSourceMinValue">0</nmwg:parameter>
+ <nmwg:parameter
name="dataSourceMaxValue">10000000</nmwg:parameter>
</nmwg:parameters>
</nmwg:key>
</nmwg:data>
Modified: branches/JAVA-RRD-MA-STABLE/doc/ma/rrdTypeMA/ChangeLog.txt
===================================================================
--- branches/JAVA-RRD-MA-STABLE/doc/ma/rrdTypeMA/ChangeLog.txt 2007-05-21
14:47:44 UTC (rev 2407)
+++ branches/JAVA-RRD-MA-STABLE/doc/ma/rrdTypeMA/ChangeLog.txt 2007-05-21
14:50:25 UTC (rev 2408)
@@ -12,4 +12,9 @@
- Change: support for new utilization evenType value naming scheme
- Change: log4J configuration in log4j.properties
- Fixed Bug #108: installation process
-- Fixed Bug #109: installation process
\ No newline at end of file
+- Fixed Bug #109: installation process
+
+
+2007-05-15 Version 2.1
+
+- Change: default log4j parameters updated; log files (archives and current)
for one log level is limited up to 6MB
Modified:
branches/JAVA-RRD-MA-STABLE/schema/example-instances/perfSONAR/MeasurementArchiveStoreRequest-1.xml
===================================================================
---
branches/JAVA-RRD-MA-STABLE/schema/example-instances/perfSONAR/MeasurementArchiveStoreRequest-1.xml
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/schema/example-instances/perfSONAR/MeasurementArchiveStoreRequest-1.xml
2007-05-21 14:50:25 UTC (rev 2408)
@@ -22,7 +22,7 @@
<netutil:subject id="subj1">
<nmwgt:interface>
<nmwgt:hostName>test-hostName</nmwgt:hostName>
- <nmwgt:ifAddress type="ipv4">10.1.2.3</nmwgt:ifAddress>
+ <nmwgt:ifAddress type="ipv4">10.1.2.2</nmwgt:ifAddress>
<nmwgt:ifName>test-0</nmwgt:ifName>
<nmwgt:ifDescription>test descripyion</nmwgt:ifDescription>
<nmwgt:direction>in</nmwgt:direction>
@@ -30,11 +30,18 @@
<nmwgt:capacity>1000BaseT</nmwgt:capacity>
</nmwgt:interface>
</netutil:subject>
- <nmwg:eventType>utilization</nmwg:eventType>
+ <nmwg:parameters>
+ <nmwg:parameter name="dataSourceStep">300</nmwg:parameter>
+ <nmwg:parameter name="dataSourceType">COUNTER</nmwg:parameter>
+ <nmwg:parameter name="dataSourceHeartbeat">1800</nmwg:parameter>
+ <nmwg:parameter name="dataSourceMinValue">0</nmwg:parameter>
+ <nmwg:parameter
name="dataSourceMaxValue">10000000000000</nmwg:parameter>
+ </nmwg:parameters>
+
<nmwg:eventType>http://ggf.org/ns/nmwg/characteristic/utilization/2.0</nmwg:eventType>
</nmwg:metadata>
<nmwg:data id="data1" metadataIdRef="meta1">
- <nmwg:datum value="12345" timeValue="1139270800" timeType="unix"
valueUnits="bps" />
+ <nmwg:datum value="12345" timeValue="1179149601" timeType="unix"
valueUnits="bps" />
</nmwg:data>
</nmwg:message>
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/client/commons/requests/RequestGenerator.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/client/commons/requests/RequestGenerator.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/client/commons/requests/RequestGenerator.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -5,7 +5,7 @@
package org.perfsonar.client.commons.requests;
import org.ggf.ns.nmwg.base.v2_0.Message;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* @author Maciej Glowiak
@@ -25,7 +25,7 @@
*
* @throws SystemException
*/
- public Message generateRequestMessage() throws SystemException;
+ public Message generateRequestMessage() throws PerfSONARException;
} //RequestGenerator
\ No newline at end of file
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/client/commons/requests/lookupService/LSRegisterRequestGenerator.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/client/commons/requests/lookupService/LSRegisterRequestGenerator.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/client/commons/requests/lookupService/LSRegisterRequestGenerator.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -24,7 +24,7 @@
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.util.XMLUtils;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* This class is responsible for creating LSRegisterRequest
@@ -49,7 +49,7 @@
// --------------------------------------------------------- Public
Methods
- public Message generateRequestMessage() throws SystemException {
+ public Message generateRequestMessage() throws PerfSONARException {
System.out.println("LSRegisterRequestGenerator: generateRequest");
@@ -79,10 +79,10 @@
//access point -- mandatory
String
accessPointString=(String)commonParameters.get("access_point");
- if (accessPointString==null) throw new SystemException(
+ if (accessPointString==null) throw new PerfSONARException(
"error.lsregistrator.no_accesspoint",
"AccessPoint parameter was not found. Registration failed");
- if ("".equals(accessPointString)) throw new SystemException(
+ if ("".equals(accessPointString)) throw new PerfSONARException(
"error.lsregistrator.no_accesspoint",
"AccessPoint parameter was empty. Registration failed");
AccessPoint ap = new AccessPoint();
@@ -91,10 +91,10 @@
//service name -- mandatory
String
serviceNameString=(String)commonParameters.get("service_name");
- if (serviceNameString==null) throw new SystemException(
+ if (serviceNameString==null) throw new PerfSONARException(
"error.lsregistrator.no_servicename",
"ServiceName parameter was not found. Registration failed");
- if ("".equals(serviceNameString)) throw new SystemException(
+ if ("".equals(serviceNameString)) throw new PerfSONARException(
"error.lsregistrator.no_servicename",
"ServiceName parameter was empty. Registration failed");
ServiceName sn = new ServiceName();
@@ -103,10 +103,10 @@
//service type -- mandatory
String
serviceTypeString=(String)commonParameters.get("service_type");
- if (serviceTypeString==null) throw new SystemException(
+ if (serviceTypeString==null) throw new PerfSONARException(
"error.lsregistrator.no_servicetype",
"ServiceType parameter was not found. Registration failed");
- if ("".equals(serviceTypeString)) throw new SystemException(
+ if ("".equals(serviceTypeString)) throw new PerfSONARException(
"error.lsregistrator.no_servicename",
"ServiceType parameter was empty. Registration failed");
ServiceType st = new ServiceType();
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/AuxiliaryComponent.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/AuxiliaryComponent.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/AuxiliaryComponent.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -1,6 +1,6 @@
package org.perfsonar.commons.auxiliary;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* AuxiliaryComponent is an interface for all components loaded and
@@ -16,7 +16,7 @@
* Method used for initialize AuxiliaryComponent
* @throws SystemException
*/
- public void initComponent() throws SystemException;
+ public void initComponent() throws PerfSONARException;
/**
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/AuxiliaryComponentManager.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/AuxiliaryComponentManager.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/AuxiliaryComponentManager.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -8,7 +8,7 @@
import java.net.URL;
import java.util.Iterator;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* AuxiliaryComponentManager is a container for components - modules of
@@ -63,7 +63,7 @@
* Set up the manager. Load mappings from components.properties file
* and creates all component objects
*/
- public void initManager() throws SystemException {
+ public void initManager() throws PerfSONARException {
//read components from Configuration file and init them
@@ -72,7 +72,7 @@
if(urlString==null || urlString.toString()==null) {
- throw new
SystemException("AuxiliaryComponentManager.initManager: " +
+ throw new
PerfSONARException("AuxiliaryComponentManager.initManager: " +
"Missing or unable to locate components.properties file.
Cannot continue");
}
String configFileName = urlString.getFile();
@@ -109,7 +109,7 @@
component.initComponent();
- } catch (SystemException ex) {
+ } catch (PerfSONARException ex) {
System.err.println(ex.getMessage());
//do nothing - not critical exception, just load other
//modules
@@ -119,13 +119,13 @@
}
} catch (FileNotFoundException e) {
- throw new
SystemException("error.common.manager.no_configuration",
+ throw new
PerfSONARException("error.common.manager.no_configuration",
"AuxiliaryComponentManager: Cannot load " +
"component.properties file. " +
"Encountered FileNotFound Exception. Message: "
+e.getMessage());
} catch (IOException e) {
- throw new
SystemException("error.common.manager.no_configuration",
+ throw new
PerfSONARException("error.common.manager.no_configuration",
"AuxiliaryComponentManager: Cannot load " +
"component.properties file. " +
"Encountered IO Exception. Message: "
@@ -141,10 +141,10 @@
*
* @param componentName
* @param componentClassName
- * @throws SystemException
+ * @throws PerfSONARException
*/
public AuxiliaryComponent loadComponent(String componentName, String
componentClassName)
- throws SystemException {
+ throws PerfSONARException {
AuxiliaryComponent component = null;
@@ -164,17 +164,17 @@
String m = "AUXComponentManager: " +
"can't create component ["+componentName+"]. " +
"Encountered ClassNotFound Exception. Message: "+ex.getMessage();
- throw new
SystemException("error.common.manager.cant_create_component", m);
+ throw new
PerfSONARException("error.common.manager.cant_create_component", m);
} catch (InstantiationException ex) {
String m = "AUXComponentManager: " +
"can't create component ["+componentName+"]. " +
"Encountered Instantiation Exception. Message: "+ex.getMessage();
- throw new
SystemException("error.common.manager.cant_create_component", m);
+ throw new
PerfSONARException("error.common.manager.cant_create_component", m);
} catch (IllegalAccessException ex) {
String m = "AUXComponentManager: " +
"can't create component ["+componentName+"]. " +
"Encountered IllegalAccess Exception. Message: "+ex.getMessage();
- throw new
SystemException("error.common.manager.cant_create_component", m);
+ throw new
PerfSONARException("error.common.manager.cant_create_component", m);
}
return component;
@@ -225,7 +225,7 @@
* It's singleton pattern
*/
public static AuxiliaryComponentManager getInstance()
- throws SystemException {
+ throws PerfSONARException {
if (componentManager == null) {
componentManager= new AuxiliaryComponentManager();
@@ -239,7 +239,7 @@
/**
* For standalone applications
*/
- public static void main(String[] args) throws SystemException {
+ public static void main(String[] args) throws PerfSONARException {
//components.properties =
projects/sonar/perfsonar/conf/components.properties
AuxiliaryComponentManager.getInstance();
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/AuxiliaryThreadedComponent.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/AuxiliaryThreadedComponent.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/AuxiliaryThreadedComponent.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -1,6 +1,5 @@
package org.perfsonar.commons.auxiliary;
-import org.perfsonar.service.commons.exceptions.SystemException;
/**
* AuxiliaryThreadedComponent is extension of AuxiliaryComponent supporting
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/ComponentsConfigurationReader.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/ComponentsConfigurationReader.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/ComponentsConfigurationReader.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -69,11 +69,5 @@
}
} //Entry
-
-// for (Entry e : new
ComponentsConfigurationReader().readFile("/projects/sonar/perfsonar/conf/components.properties.ma"))
{
-// System.out.println(e.getName()+" : "+e.getValue());
-// }
-
-
} //ComponentsConfig
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/components/configuration/ConfigurationComponent.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/components/configuration/ConfigurationComponent.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/components/configuration/ConfigurationComponent.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -2,7 +2,7 @@
import java.util.Properties;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
@@ -20,11 +20,11 @@
*
* @param name of the parameter
* @return String containing value/s for the parameter
- * @throws SystemException when property couldn't be read
+ * @throws PerfSONARException when property couldn't be read
*/
- public String getProperty(String name) throws SystemException;
+ public String getProperty(String name) throws PerfSONARException;
- public Properties getProperties() throws SystemException;
+ public Properties getProperties() throws PerfSONARException;
} //ConfigurationComponent
\ No newline at end of file
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/components/configuration/properties/PropertiesConfigurationComponent.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/components/configuration/properties/PropertiesConfigurationComponent.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/components/configuration/properties/PropertiesConfigurationComponent.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -7,7 +7,7 @@
import org.perfsonar.commons.auxiliary.AuxiliaryComponent;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* Class which reads configurations from a properties file
@@ -43,7 +43,7 @@
// ---------------------------------- constructor
- public void initComponent() throws SystemException {
+ public void initComponent() throws PerfSONARException {
// bootstrapped absolute file location in catalina.properties file
URL fileNameURL =
this.getClass().getClassLoader().getResource("perfsonar/conf/service.properties");
@@ -53,7 +53,7 @@
System.out.println("PropertiesConfigurationComponent.initComponent:" +
" Missing or unable to locate service.properties file. Cannot
complete request.");
- throw new
SystemException("PropertiesConfigurationComponent.initComponent:" +
+ throw new
PerfSONARException("PropertiesConfigurationComponent.initComponent:" +
" Missing or unable to locate service.properties file. Cannot
complete request.");
}
@@ -68,7 +68,7 @@
file = new File(fileName);
} catch(NullPointerException npe) {
- throw new SystemException("PropertiesConfigurationComponent: "
+ throw new PerfSONARException("PropertiesConfigurationComponent: "
+ "Unable to create a file object"
+ "referring to service.properties" ,
npe);
@@ -90,9 +90,9 @@
* @return Properties - static object containing all the properties
* in the property file
*
- * @throws SystemException when properties couldn't be read
+ * @throws PerfSONARException when properties couldn't be read
*/
- public Properties getProperties() throws SystemException {
+ public Properties getProperties() throws PerfSONARException {
return properties;
@@ -105,14 +105,14 @@
*
* @param name of the parameter
* @return String containing value/s for the parameter
- * @throws SystemException when property couldn't be read
+ * @throws PerfSONARException when property couldn't be read
*/
- public String getProperty(String name) throws SystemException {
+ public String getProperty(String name) throws PerfSONARException {
String property = properties.getProperty(name);
if (property == null) {
- throw new SystemException(
+ throw new PerfSONARException(
"PropertiesConfigurationComponent.getProperty: "
+ "Requested Param: "+ name + "not found");
}
@@ -145,7 +145,7 @@
* from a property file
*
*/
- void loadConfiguration() throws SystemException {
+ void loadConfiguration() throws PerfSONARException {
try {
@@ -161,7 +161,7 @@
in.close();
} catch (Exception e) {
- throw new SystemException(e.getMessage());
+ throw new PerfSONARException(e.getMessage());
}
}
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/components/mapping/ExpressionMapping.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/components/mapping/ExpressionMapping.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/components/mapping/ExpressionMapping.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -11,7 +11,7 @@
import org.perfsonar.commons.auxiliary.ComponentsConfigurationReader;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* @author Maciej Glowiak
@@ -44,7 +44,7 @@
* Reads configuration mapping from file given as
* component.ComponentName.mapping_file property
*/
- public void initComponent() throws SystemException {
+ public void initComponent() throws PerfSONARException {
LoggerComponent logger = ((LoggerComponent)
AuxiliaryComponentManager.getInstance().
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/components/scheduler/ScheduleMessageHandler.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/components/scheduler/ScheduleMessageHandler.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/components/scheduler/ScheduleMessageHandler.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -10,7 +10,7 @@
import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.ComponentNames;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.ggf.ns.nmwg.base.v2_0.Element;
import org.ggf.ns.nmwg.base.v2_0.Handler;
@@ -33,7 +33,7 @@
// ------------------------------------ constructor
- public ScheduleMessageHandler() throws SystemException {
+ public ScheduleMessageHandler() throws PerfSONARException {
super();
this.logger =
(LoggerComponent)AuxiliaryComponentManager.getInstance().getComponent(ComponentNames.LOGGER);
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/components/scheduler/ScheduleMessageParser.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/components/scheduler/ScheduleMessageParser.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/components/scheduler/ScheduleMessageParser.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -19,8 +19,7 @@
import org.perfsonar.commons.auxiliary.ComponentNames;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.w3c.dom.Document;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
@@ -54,9 +53,9 @@
/**
* Constructor which initializes loggers, configuration components and
handlers
*
- * @throws SystemException
+ * @throws PerfSONARException
*/
- public ScheduleMessageParser() throws SystemException {
+ public ScheduleMessageParser() throws PerfSONARException {
logger =
(LoggerComponent)AuxiliaryComponentManager.getInstance().getComponent(ComponentNames.LOGGER);
@@ -73,15 +72,15 @@
* Parses xml in a document in order to convert it into a message object
*
* @param object of type org.w3c.dom.Document containing the given xml
- * @throws SystemException
+ * @throws PerfSONARException
* @throws RequestException
*
*/
- public void parse(Document document) throws SystemException,
RequestException {
+ public void parse(Document document) throws PerfSONARException {
if(document==null) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.parse_error",
"ScheduleMessageHandler.parse: Document object in request
is null. Nothing to parse");
@@ -98,7 +97,7 @@
logger.fatal("ScheduleMessageHandler - IO exception encountered
while "
+ "serializing request document");
- throw new SystemException("error.common.parse_error",
+ throw new PerfSONARException("error.common.parse_error",
"ScheduleMessageHandler- IO exception encountered while "
+ "serializing request document@: "+ e.getMessage());
}
@@ -114,14 +113,14 @@
* Parses xml present in a string object in order to convert it into a
message object
*
* @param requestString object of type string containing given xml
- * @throws SystemException
+ * @throws PerfSONARException
* @throws RequestException
*/
- public void parse(String requestString) throws SystemException,
RequestException {
+ public void parse(String requestString) throws PerfSONARException {
if(requestString==null) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.parse_error",
"ScheduleMessageHandler.parse: String object in request
is null. Nothing to parse");
@@ -139,10 +138,10 @@
* Parses xml presented as an input source
*
* @param inputSource object of type InputSource containing xml
- * @throws SystemException
+ * @throws PerfSONARException
* @throws RequestException
*/
- public void parse(InputSource inputSource) throws SystemException,
RequestException {
+ public void parse(InputSource inputSource) throws PerfSONARException {
@@ -182,7 +181,7 @@
logger.fatal("ScheduleMessageHandler.parse: SAX Exception
occurred while "
+ "satisfying request. Error Message: "
+ e.getMessage());
- throw new RequestException("error.common.parse_error",
+ throw new PerfSONARException("error.common.parse_error",
"Request could not be parsed because "
+ "of SAX exception. Error message: "
+ e.getMessage());
@@ -192,21 +191,21 @@
logger.fatal("ScheduleMessageHandler.parse: - IO exception
encountered while "
+ "reading schema file");
- throw new SystemException("error.common.parse_error",
"MonitoringService - IO exception "
+ throw new PerfSONARException("error.common.parse_error",
"MonitoringService - IO exception "
+ "encountered while reading schema file "
+ e.getMessage());
} catch (SAXException e) {
logger.fatal("ScheduleMessageHandler.parse -SAX Exception");
- throw new SystemException("error.common.parse_error",
+ throw new PerfSONARException("error.common.parse_error",
"MonitoringService - SAX Exception "
+ e.getMessage());
} catch (ParserConfigurationException e) {
logger.fatal("ScheduleMessageHandler.parse -Parser Configuration
Exception");
- throw new SystemException("error.common.parse_error",
+ throw new PerfSONARException("error.common.parse_error",
"MonitoringService - Parser Configuration "
+ "Exception " + e.getMessage());
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/components/scheduler/Scheduler.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/components/scheduler/Scheduler.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/components/scheduler/Scheduler.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -19,10 +19,7 @@
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
import
org.perfsonar.commons.auxiliary.components.scheduler.actions.GenericSchedulerAction;
import
org.perfsonar.commons.auxiliary.components.scheduler.actions.SchedulerAction;
-
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import
org.perfsonar.service.commons.storage.xmldb.exist.xmlrpc.ExistDbXmlrpcXmlDataRepository;
import
org.perfsonar.service.commons.storage.xmldb.exist.xmlrpc.ExistDbXmlrpcXmlStorageManager;
@@ -48,7 +45,7 @@
// ----------------------------Constructor
- public void initComponent() throws SystemException {
+ public void initComponent() throws PerfSONARException {
try {
@@ -57,13 +54,13 @@
configurationComponent =
(ConfigurationComponent)AuxiliaryComponentManager.getInstance().getComponent(ComponentNames.CONFIG);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
System.out.println("Scheduler: ERROR! Scheduler could not be
initialized because " +
"either ServiceConfigurationManager or Log could not be
initialized. " +
"Scheduler cannot continue without these components");
- throw new SystemException("error.common.scheduler.init",
+ throw new PerfSONARException("error.common.scheduler.init",
"Scheduler: ERROR! Scheduler could not be initialized
because " +
"either ServiceConfigurationManager or Log could not be
initialized. " +
"Scheduler cannot continue without these components.
Error message: "+e.getMessage());
@@ -122,7 +119,7 @@
// ---------------------------- Public Methods
- public void readSchedules(String scheduleSeconds) throws
RequestException, DataFormatException, SystemException {
+ public void readSchedules(String scheduleSeconds) throws
PerfSONARException {
logger.debug("Scheduler.readSchedules: Scheduler has been woken up
to read schedules");
@@ -137,7 +134,7 @@
password =
this.configurationComponent.getProperty("Scheduler.Database.XML.login.password");
community =
this.configurationComponent.getProperty("Scheduler.Database.XML.community");
- }catch(SystemException e) {
+ }catch(PerfSONARException e) {
logger.fatal("Scheduler.readSchedules: Scheduler is unable to
" +
"read configuration information required to
connect to " +
@@ -254,7 +251,7 @@
"list of schedules to be executed.
This entry, " +
"with metadata
id="+metadataElement.getId()+" does not" +
"refer to any metadata chain that
should be executed");
- throw new
SystemException("error.common.scheduler.init",
+ throw new
PerfSONARException("error.common.scheduler.init",
"Scheduler: Corrupt entry found in the " +
"list of schedules to be executed.
Metadata reference missing " +
"in metadata element"
+metadataElement.getId());
@@ -551,9 +548,9 @@
* @param args
* @throws RequestException
* @throws DataFormatException
- * @throws SystemException
+ * @throws PerfSONARException
*/
- public static void main(String args[]) throws RequestException,
DataFormatException, SystemException {
+ public static void main(String args[]) throws PerfSONARException {
Scheduler tester = new Scheduler();
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/components/scheduler/actions/SchedulerAction.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/components/scheduler/actions/SchedulerAction.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/components/scheduler/actions/SchedulerAction.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -9,25 +9,21 @@
import java.util.Iterator;
import java.util.Map;
-import org.perfsonar.service.commons.engine.ServiceEngine;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.ResourceException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-import org.perfsonar.service.commons.measurementExecutor.MeasurementExecutor;
-import org.perfsonar.service.commons.storage.StorageManager;
+import org.ggf.ns.nmwg.base.v2_0.Data;
+import org.ggf.ns.nmwg.base.v2_0.EventType;
+import org.ggf.ns.nmwg.base.v2_0.Message;
+import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.ComponentNames;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
+import org.perfsonar.service.commons.engine.ServiceEngine;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
+import org.perfsonar.service.commons.measurementExecutor.MeasurementExecutor;
+import org.perfsonar.service.commons.storage.StorageManager;
-import org.ggf.ns.nmwg.base.v2_0.Data;
-import org.ggf.ns.nmwg.base.v2_0.EventType;
-import org.ggf.ns.nmwg.base.v2_0.Message;
-import org.ggf.ns.nmwg.base.v2_0.Metadata;
-
/**
* Abstract SchedulerAction class
*
@@ -59,7 +55,7 @@
* @param me
* @throws SystemException
*/
- public void init(Metadata[] metadataList, int me) throws SystemException
{
+ public void init(Metadata[] metadataList, int me) throws
PerfSONARException {
this.me = me;
@@ -99,7 +95,7 @@
*
* @param messageList An array of Message objects
* containing well defined actions
- * @throws SystemException
+ * @throws PerfSONARException
*/
public void performAction() {
@@ -281,7 +277,7 @@
try {
interfaceNameFromProperties =
this.configurationComponent.getProperty(eventTypeInterfaceName);
- } catch (SystemException e2) {
+ } catch (PerfSONARException e2) {
matchedInterfaceClassName = null;
@@ -455,35 +451,36 @@
"was encoutered :"+e2.getMessage());
return;
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
logger.error("SchedulerAction: The eventType in the
schedule: "+eventTypeString+" "+
"has been configured to be handled by the " +
"class: " +handlerClassName+". But
SchedulerAction " +
"(generic) encountered a System
Exception:"+e.getMessage());
return;
- } catch (RequestException e) {
- logger.error("SchedulerAction: The eventType in the
schedule: "+eventTypeString+" "+
- "has been configured to be handled by the " +
- "class: " +handlerClassName+". But
SchedulerAction " +
- "(generic) encountered a Request
Exception:"+e.getMessage());
- return;
-
- } catch (DataFormatException e) {
- logger.error("SchedulerAction: The eventType in the
schedule: "+eventTypeString+" "+
- "has been configured to be handled by the " +
- "class: " +handlerClassName+". But
SchedulerAction " +
- "(generic) encountered a DataFormat
Exception:"+e.getMessage());
- return;
-
- } catch (ResourceException e) {
- logger.error("SchedulerAction: The eventType in the
schedule: "+eventTypeString+" "+
- "has been configured to be handled by the " +
- "class: " +handlerClassName+". But
SchedulerAction " +
- "(generic) encountered a Resource
Exception:"+e.getMessage());
- return;
}
-
+//catch (RequestException e) {
+// logger.error("SchedulerAction: The eventType in
the schedule: "+eventTypeString+" "+
+// "has been configured to be handled by the
" +
+// "class: " +handlerClassName+". But
SchedulerAction " +
+// "(generic) encountered a Request
Exception:"+e.getMessage());
+// return;
+//
+// } catch (DataFormatException e) {
+// logger.error("SchedulerAction: The eventType in
the schedule: "+eventTypeString+" "+
+// "has been configured to be handled by the
" +
+// "class: " +handlerClassName+". But
SchedulerAction " +
+// "(generic) encountered a DataFormat
Exception:"+e.getMessage());
+// return;
+//
+// } catch (ResourceException e) {
+// logger.error("SchedulerAction: The eventType in
the schedule: "+eventTypeString+" "+
+// "has been configured to be handled by the
" +
+// "class: " +handlerClassName+". But
SchedulerAction " +
+// "(generic) encountered a Resource
Exception:"+e.getMessage());
+// return;
+// }
+//
}
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/components/simplescheduler/Scheduler.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/components/simplescheduler/Scheduler.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/auxiliary/components/simplescheduler/Scheduler.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -5,17 +5,17 @@
*/
package org.perfsonar.commons.auxiliary.components.simplescheduler;
+import java.util.Collections;
+import java.util.ConcurrentModificationException;
import java.util.HashSet;
import java.util.Set;
-import java.util.Collections;
-import java.util.ConcurrentModificationException;
+import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.AuxiliaryThreadedComponent;
-import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.ComponentNames;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
@@ -59,7 +59,7 @@
// ------------------------------------------------- Public methods
- public void initComponent() throws SystemException {
+ public void initComponent() throws PerfSONARException {
try {
@@ -70,12 +70,12 @@
AuxiliaryComponentManager.getInstance().
getComponent(ComponentNames.CONFIG);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
String m = "Cannot initialize components: " +
"logger and configuration "+e.getMessage();
- throw new SystemException("error.common.no_configuration",m);
+ throw new PerfSONARException("error.common.no_configuration",m);
}
@@ -202,7 +202,7 @@
// ---------------------------- Private Methods
- public static void main(String[] a) throws SystemException {
+ public static void main(String[] a) throws PerfSONARException {
new Scheduler().initComponent();
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/container/listeners/StartupInitializer.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/container/listeners/StartupInitializer.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/container/listeners/StartupInitializer.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -3,15 +3,15 @@
package org.perfsonar.commons.container.listeners;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
-import javax.servlet.ServletContextEvent;
+import org.perfsonar.commons.auxiliary.AuxiliaryComponent;
import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
-import org.perfsonar.commons.auxiliary.AuxiliaryComponent;
import org.perfsonar.commons.auxiliary.AuxiliaryThreadedComponent;
-import org.perfsonar.commons.auxiliary.ComponentNames;
-import java.util.Map;
-import java.util.Iterator;
/**
* StartupInitializer is a servlet context listener, handling perfSONAR
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/BaseChaining.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/BaseChaining.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/BaseChaining.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -5,20 +5,17 @@
package org.perfsonar.commons.messages;
-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.Data;
-
-import java.util.Map;
-import java.util.HashMap;
import java.util.Iterator;
+import java.util.Map;
+import org.ggf.ns.nmwg.base.v2_0.Data;
+import org.ggf.ns.nmwg.base.v2_0.Message;
+import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.ComponentNames;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-
/**
* This class handles base chaining of metadata blocks
*
@@ -41,7 +38,7 @@
- public BaseChaining() throws SystemException {
+ public BaseChaining() throws PerfSONARException {
this.logger = (LoggerComponent)
AuxiliaryComponentManager.
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/DataRequest.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/DataRequest.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/DataRequest.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -5,15 +5,17 @@
package org.perfsonar.commons.messages;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
-import java.util.ArrayList;
-import org.perfsonar.service.commons.exceptions.*;
+import org.ggf.ns.nmwg.base.v2_0.Data;
+import org.ggf.ns.nmwg.base.v2_0.Key;
+import org.ggf.ns.nmwg.base.v2_0.Message;
+import org.ggf.ns.nmwg.base.v2_0.Metadata;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.ggf.ns.nmwg.base.v2_0.*;
-
/**
* Implements common methods needed by Data centric messages.
*
@@ -30,7 +32,7 @@
// ---------------------------------- constructors
public DataRequest()
- throws SystemException{
+ throws PerfSONARException{
type = new String("DataRequest");
}
@@ -46,7 +48,7 @@
Map mdMap,
ArrayList mdChain,
boolean mustKey)
- throws RequestException
+ throws PerfSONARException
{
if(head == null){
return;
@@ -62,7 +64,7 @@
logger.fatal(
"SetupDataRequest: Metadata MUST hold a key " +
"for GET_DATA");
- throw new RequestException(
+ throw new PerfSONARException(
"SetupDataRequest: Metadata MUST hold a key " +
"for GET_DATA");
}
@@ -80,7 +82,7 @@
else if(key == null){
logger.fatal(
"SetupDataRequest: Metadata MUST have subject or key");
- throw new RequestException(
+ throw new PerfSONARException(
"SetupDataRequest: Metadata MUST have subject or key");
}
@@ -100,8 +102,7 @@
protected Message metaToKey(
Message reqMessage,
Message respMessage)
- throws SystemException,ResourceException,
- DataFormatException,RequestException {
+ throws PerfSONARException {
/*
* Get Map for MetaData and Data children from reqMessage
@@ -136,7 +137,7 @@
logger.fatal(
"DataRequest.metaToKey: Data element must refer to "
+
"a metadata element.");
- throw new RequestException(
+ throw new PerfSONARException(
"DataRequest.metaToKey: Data element must refer to "
+
"a metadata element.");
}
@@ -189,7 +190,7 @@
if (hasData < 1){
logger.fatal(
"DataRequest.metaToKey: returned no data");
- throw new RequestException(
+ throw new PerfSONARException(
"DataRequest.metaToKey: returned no data");
}
@@ -203,14 +204,14 @@
if (hasMd < 1){
logger.fatal(
"DataRequest.metaToKey: returned no Metadata");
- throw new RequestException(
+ throw new PerfSONARException(
"DataRequest.metaToKey: returned no Metadata");
}
if(hasData > hasMd){
logger.fatal("MetadataKeyRequest: Invalid data/metadata " +
"mapping returned from service");
- throw new RequestException(
+ throw new PerfSONARException (
"MetadataKeyRequest: Invalid data/metadata " +
"mapping returned from service");
}
@@ -225,7 +226,7 @@
// the other signature is used to add to an existing message.
protected Message metaToKey(
Message reqMessage
- ) throws
SystemException,ResourceException,DataFormatException,RequestException
+ ) throws PerfSONARException
{
Message respMessage = new Message();
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-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/EchoRequest.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -6,23 +6,18 @@
package org.perfsonar.commons.messages;
-import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-import org.perfsonar.service.commons.exceptions.ResourceException;
-import org.perfsonar.service.commons.engine.ActionType;
-import org.perfsonar.service.commons.util.ResultCodesUtil;
+import java.util.ArrayList;
+import java.util.Map;
-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.Data;
import org.ggf.ns.nmwg.base.v2_0.EventType;
+import org.ggf.ns.nmwg.base.v2_0.Message;
+import org.ggf.ns.nmwg.base.v2_0.Metadata;
+import org.perfsonar.service.commons.engine.ActionType;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
+import org.perfsonar.service.commons.util.ResultCodesUtil;
-import java.util.ArrayList;
-import java.util.Map;
-
/**
* MessageHandler for EchoRequest messages.
*
@@ -44,7 +39,7 @@
- public EchoRequest() throws SystemException {
+ public EchoRequest() throws PerfSONARException {
super();
logger.debug("EchoRequest: MessageHandler created");
@@ -112,7 +107,7 @@
protected Message executeEcho(Message request)
- throws SystemException, RequestException, DataFormatException,
ResourceException {
+ throws PerfSONARException {
Data data = request.getDataArray()[0];
Metadata metadata = request.getMetadata(data.getMetadataIdRef());
@@ -121,7 +116,7 @@
if (eventType == null) {
logger.debug("EchoRequest.executeEcho: The request does not
contain "
+ "eventType element");
- throw new SystemException(
+ throw new PerfSONARException(
"error.request",
"EchoRequest.executeEcho: The request does
not contain "
+ "eventType element");
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/LSCleanupRequest.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/LSCleanupRequest.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/LSCleanupRequest.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -5,7 +5,7 @@
package org.perfsonar.commons.messages;
import org.perfsonar.service.commons.engine.ActionType;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
@@ -19,7 +19,7 @@
/**
* @throws SystemException
*/
- public LSCleanupRequest() throws SystemException {
+ public LSCleanupRequest() throws PerfSONARException {
super();
logger.debug("LSCleanupRequest: MessageHandler created");
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/LSDeregisterRequest.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/LSDeregisterRequest.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/LSDeregisterRequest.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -5,13 +5,10 @@
package org.perfsonar.commons.messages;
import org.perfsonar.service.commons.engine.ActionType;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.ggf.ns.nmwg.base.v2_0.Metadata;
-import java.util.Map;
-
/**
* @author Maciej Glowiak
* MessageHandler for LS DeRegiser Request
@@ -23,7 +20,7 @@
/**
* @throws SystemException
*/
- public LSDeregisterRequest() throws SystemException {
+ public LSDeregisterRequest() throws PerfSONARException {
super();
logger.debug("LSDeRegisterRequest: MessageHandler created");
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/LSKeepaliveRequest.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/LSKeepaliveRequest.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/LSKeepaliveRequest.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -5,7 +5,7 @@
package org.perfsonar.commons.messages;
import org.perfsonar.service.commons.engine.ActionType;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
@@ -19,7 +19,7 @@
/**
* @throws SystemException
*/
- public LSKeepaliveRequest() throws SystemException {
+ public LSKeepaliveRequest() throws PerfSONARException {
super();
logger.debug("LSKeepaliveRequest: MessageHandler created");
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/LSQueryRequest.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/LSQueryRequest.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/LSQueryRequest.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -5,7 +5,7 @@
package org.perfsonar.commons.messages;
import org.perfsonar.service.commons.engine.ActionType;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import java.util.Map;
@@ -23,7 +23,7 @@
/**
* @throws SystemException
*/
- public LSQueryRequest() throws SystemException {
+ public LSQueryRequest() throws PerfSONARException {
super();
logger.debug("LSQueryRequest: MessageHandler created");
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/LSRegisterRequest.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/LSRegisterRequest.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/LSRegisterRequest.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -11,19 +11,11 @@
import org.perfsonar.service.commons.engine.ActionType;
import org.perfsonar.service.commons.engine.ServiceEngine;
import org.perfsonar.service.commons.engine.ServiceEngineFactory;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.ResourceException;
-import org.perfsonar.service.commons.exceptions.SystemException;
import org.perfsonar.service.commons.util.ResultCodesUtil;
-
import org.ggf.ns.nmwg.base.v2_0.Message;
-import org.ggf.ns.nmwg.base.v2_0.Metadata;
-import java.util.Map;
-
/**
* @author Maciej Glowiak
* MessageHandler for LS Regiser Request
@@ -50,7 +42,7 @@
/**
* @throws SystemException
*/
- public LSRegisterRequest() throws SystemException {
+ public LSRegisterRequest() throws PerfSONARException {
// get a logger
logger = (LoggerComponent)AuxiliaryComponentManager.
@@ -88,7 +80,7 @@
}
- public Message execute(Message reqMessage) throws SystemException,
ResourceException, DataFormatException, RequestException {
+ public Message execute(Message reqMessage) throws PerfSONARException {
Message respMessage = null;
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/LSRequest.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/LSRequest.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/LSRequest.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -5,15 +5,10 @@
package org.perfsonar.commons.messages;
-import java.util.Collection;
import java.util.Map;
-
import org.ggf.ns.nmwg.base.v2_0.Metadata;
-import org.ggf.ns.nmwg.base.v2_0.Parameter;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-
-
/**
* General MessageHangler for LS
*
@@ -27,7 +22,7 @@
/**
* @throws SystemException
*/
- public LSRequest() throws SystemException {
+ public LSRequest() throws PerfSONARException {
super();
setType("LSRequest");
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/LookupInfoRequest.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/LookupInfoRequest.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/LookupInfoRequest.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -5,33 +5,28 @@
package org.perfsonar.commons.messages;
-import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-import org.perfsonar.service.commons.exceptions.ResourceException;
-import org.perfsonar.service.commons.engine.ActionType;
-import
org.perfsonar.service.commons.registration.PropertiesServiceDescription;
-import org.perfsonar.service.commons.util.ResultCodesUtil;
+import java.util.ArrayList;
+import java.util.Map;
-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.Data;
import org.ggf.ns.nmwg.base.v2_0.EventType;
+import org.ggf.ns.nmwg.base.v2_0.Message;
+import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.AccessPoint;
+import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.ContactEmail;
+import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.Datum;
+import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.Organization;
import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.Service;
import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.ServiceDescription;
import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.ServiceName;
import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.ServiceType;
-import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.Datum;
-import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.Organization;
import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.ServiceVersion;
-import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.ContactEmail;
+import org.perfsonar.service.commons.engine.ActionType;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
+import
org.perfsonar.service.commons.registration.PropertiesServiceDescription;
+import org.perfsonar.service.commons.util.ResultCodesUtil;
-import java.util.ArrayList;
-import java.util.Map;
-
/**
* MessageHandler for LookupInfoRequest messages.
*
@@ -54,7 +49,7 @@
- public LookupInfoRequest() throws SystemException {
+ public LookupInfoRequest() throws PerfSONARException {
super();
logger.debug("LookupInfoRequest: MessageHandler created");
@@ -127,7 +122,7 @@
protected Message getLookupInfo(Message request)
- throws RequestException, PerfSONARException {
+ throws PerfSONARException {
Data data = request.getDataArray()[0];
Metadata metadata = request.getMetadata(data.getMetadataIdRef());
@@ -136,7 +131,7 @@
if (eventType == null) {
logger.warn("LookupInfoRequest.executeEcho: The request does
not contain "
+ "eventType element");
- throw new RequestException(
+ throw new PerfSONARException(
"error.request",
"LookupInfoRequest.executeEcho: The request
does not contain "
+ "eventType element");
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/MeasurementArchiveStoreRequest.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/MeasurementArchiveStoreRequest.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/MeasurementArchiveStoreRequest.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -6,8 +6,8 @@
package org.perfsonar.commons.messages;
-import org.perfsonar.service.commons.exceptions.SystemException;
import org.perfsonar.service.commons.engine.ActionType;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
@@ -27,7 +27,7 @@
- public MeasurementArchiveStoreRequest() throws SystemException {
+ public MeasurementArchiveStoreRequest() throws PerfSONARException {
super();
logger.debug("MeasurementArchiveStoreRequest: MessageHandler
created");
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/MeasurementRequest.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/MeasurementRequest.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/MeasurementRequest.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -6,7 +6,7 @@
package org.perfsonar.commons.messages;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.engine.ActionType;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
@@ -26,7 +26,7 @@
public MeasurementRequest()
- throws SystemException{
+ throws PerfSONARException{
super();
logger.debug("MeasurementRequest: MessageHandler created");
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/MessageHandler.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/MessageHandler.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/MessageHandler.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -32,7 +32,7 @@
* and returns the result.
*/
public Message execute(Message reqMessage)
- throws
SystemException,ResourceException,DataFormatException,RequestException;
+ throws PerfSONARException;
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/MessageHandlerFactory.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/MessageHandlerFactory.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/MessageHandlerFactory.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -9,7 +9,7 @@
import org.perfsonar.commons.auxiliary.ComponentNames;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import java.util.Hashtable;
@@ -26,7 +26,7 @@
static private Hashtable m2c = null;
public static MessageHandler getMessageHandler(String messageType)
- throws SystemException{
+ throws PerfSONARException{
// get a logger
LoggerComponent logger = (LoggerComponent)AuxiliaryComponentManager.
@@ -69,7 +69,7 @@
+ className);
if (className == null)
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.action_not_supported",
"Action ["+messageType+"] is not supported by " +
"the service or cannot be served - " +
@@ -89,7 +89,7 @@
+ "messageHandler for: " + messageType);
logger.fatal("MessageHandlerFactory: because of Instatiation "
+ "Problems " + e.getMessage());
- throw new SystemException("error.common.action_not_supported",
+ throw new
PerfSONARException("error.common.action_not_supported",
"MessageHandlerFactory: Unable to "
+ "create messageHandler for: " + messageType
+ " because: " + e.getMessage());
@@ -100,7 +100,7 @@
+ "messageHandler for: " + messageType);
logger.fatal("MessageHandlerFactory: because of illegalAccess"
+ e.getMessage());
- throw new SystemException("error.common.action_not_supported",
+ throw new PerfSONARException("error.common.action_not_supported",
"MessageHandlerFactory: Unable to "
+ "create messageHandler for: " + messageType
+ " because: " + e.getMessage());
@@ -111,7 +111,7 @@
+ "messageHandler for: " + messageType);
logger.fatal("MessageHandlerFactory: because classNotFound :"
+ e.getMessage());
- throw new SystemException("error.common.action_not_supported",
+ throw new PerfSONARException("error.common.action_not_supported",
"MessageHandlerFactory: Unable to "
+ "create messageHandler for: " + messageType
+" because: " + e.getMessage());
@@ -123,7 +123,7 @@
logger.fatal(
"MessageHandlerFactory: Unable to create "
+ "messageHandler for: " + messageType);
- throw new SystemException("error.common.action_not_supported",
+ throw new
PerfSONARException("error.common.action_not_supported",
"MessageHandlerFactory: Unable to "
+ "create messageHandler for: " + messageType);
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/MetadataKeyRequest.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/MetadataKeyRequest.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/MetadataKeyRequest.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -5,7 +5,7 @@
package org.perfsonar.commons.messages;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.engine.ActionType;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
@@ -27,7 +27,7 @@
- public MetadataKeyRequest() throws SystemException {
+ public MetadataKeyRequest() throws PerfSONARException {
super();
logger.debug("MetadataKeyRequest: MessageHandler created");
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/Request.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/Request.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/Request.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -20,7 +20,6 @@
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.SystemException;
import org.perfsonar.service.commons.engine.ServiceEngineFactory;
import org.perfsonar.service.commons.engine.ServiceEngine;
@@ -57,7 +56,7 @@
- public Request() throws SystemException {
+ public Request() throws PerfSONARException {
type = new String("Request");
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/SetupDataRequest.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/SetupDataRequest.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/SetupDataRequest.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -6,7 +6,7 @@
package org.perfsonar.commons.messages;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.engine.ActionType;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
@@ -28,7 +28,7 @@
- public SetupDataRequest() throws SystemException {
+ public SetupDataRequest() throws PerfSONARException {
super();
logger.debug("SetupDataRequest: MessageHandler created");
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/SubscriptionKeepaliveRequest.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/SubscriptionKeepaliveRequest.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/SubscriptionKeepaliveRequest.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -3,11 +3,11 @@
import java.util.Map;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
public class SubscriptionKeepaliveRequest extends Request {
- public SubscriptionKeepaliveRequest() throws SystemException {
+ public SubscriptionKeepaliveRequest() throws PerfSONARException {
super();
// TODO Auto-generated constructor stub
}
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/SubscriptionRequest.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/SubscriptionRequest.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/SubscriptionRequest.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -3,11 +3,11 @@
import java.util.Map;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
public class SubscriptionRequest extends Request {
- public SubscriptionRequest() throws SystemException {
+ public SubscriptionRequest() throws PerfSONARException {
super();
// TODO Auto-generated constructor stub
}
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/TOPSRequest.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/TOPSRequest.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/TOPSRequest.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -4,16 +4,9 @@
*/
package org.perfsonar.commons.messages;
-import java.util.Collection;
import java.util.Map;
-
-import org.ggf.ns.nmwg.base.v2_0.Data;
-import org.ggf.ns.nmwg.base.v2_0.Message;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.ResourceException;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
@@ -25,9 +18,9 @@
/**
- * @throws SystemException
+ * @throws PerfSONARException
*/
- public TOPSRequest() throws SystemException {
+ public TOPSRequest() throws PerfSONARException {
super();
setType("TOPSRequest");
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/UnSubscriptionRequest.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/UnSubscriptionRequest.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/messages/UnSubscriptionRequest.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -3,11 +3,11 @@
import java.util.Map;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
public class UnSubscriptionRequest extends Request {
- public UnSubscriptionRequest() throws SystemException {
+ public UnSubscriptionRequest() throws PerfSONARException {
super();
// TODO Auto-generated constructor stub
}
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/util/MathUtil.java
===================================================================
--- branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/util/MathUtil.java
2007-05-21 14:47:44 UTC (rev 2407)
+++ branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/util/MathUtil.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -5,8 +5,7 @@
*/
package org.perfsonar.commons.util;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* Class providing Mathematical functions
@@ -30,7 +29,7 @@
* @throws SystemException
* @throws DataFormatException
*/
- public double[] convertOctetsToBits (double[] octetValues) throws
SystemException, DataFormatException {
+ public double[] convertOctetsToBits (double[] octetValues) throws
PerfSONARException {
if(octetValues==null)
return null;
@@ -47,7 +46,7 @@
}catch(Exception e) {
- throw new SystemException("MathUtil: Error converting
response octet values " +
+ throw new PerfSONARException("MathUtil: Error converting
response octet values " +
"to bit values: "+e.getMessage(), e);
}
@@ -56,13 +55,13 @@
}
if (bitValues==null) {
- throw new SystemException("MathUtil: Error converting octet
values to bit values. Result was null");
+ throw new PerfSONARException("MathUtil: Error converting octet
values to bit values. Result was null");
}
if (bitValues.length==0) {
- throw new DataFormatException("Mathutil: Conversion of values in
" +
+ throw new PerfSONARException("Mathutil: Conversion of values in
" +
"octets to values in bits could not be completed.
Zero values " +
"were converted");
@@ -79,10 +78,10 @@
* @param octetValues array of long values which represent octet values
* @return array of long values which represent bit values converted
from octet values <br>
* returns null only if input is null
- * @throws SystemException
+ * @throws PerfSONARException
* @throws DataFormatException
*/
- public long[] convertOctetsToBits (long[] octetValues) throws
SystemException, DataFormatException {
+ public long[] convertOctetsToBits (long[] octetValues) throws
PerfSONARException {
if(octetValues==null)
return null;
@@ -99,7 +98,7 @@
}catch(Exception e) {
- throw new SystemException("MathUtil: Error converting
response octet values " +
+ throw new PerfSONARException("MathUtil: Error converting
response octet values " +
"to bit values: "+e.getMessage(), e);
}
@@ -108,13 +107,13 @@
}
if (bitValues==null) {
- throw new SystemException("MathUtil: Error converting octet
values to bit values. Result was null");
+ throw new PerfSONARException("MathUtil: Error converting octet
values to bit values. Result was null");
}
if (bitValues.length==0) {
- throw new DataFormatException("Mathutil: Conversion of values in
" +
+ throw new PerfSONARException("Mathutil: Conversion of values in
" +
"octets to values in bits could not be completed.
Zero values " +
"were converted");
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/util/TimeDateUtil.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/util/TimeDateUtil.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/util/TimeDateUtil.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -12,14 +12,12 @@
import org.ggf.ns.nmwg.base.v2_0.Element;
import org.ggf.ns.nmwg.base.v2_0.Parameter;
import org.ggf.ns.nmwg.time.v2_0.Time;
-
import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormatter;
import org.joda.time.format.ISODateTimeFormat;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-
/**
* This class contains methods that deal with time and date operations.
*
@@ -52,10 +50,10 @@
* @author romradz
*/
public static String getUnixTime(Parameter timeParemeter)
- throws DataFormatException {
+ throws PerfSONARException {
if (timeParemeter == null)
- throw new DataFormatException(
+ throw new PerfSONARException(
"error.parameter",
"TimeDateUtil.getUnixTime: parameter is null");
@@ -69,7 +67,7 @@
protected static String _getUnixTime(Parameter timeParemeter)
- throws DataFormatException {
+ throws PerfSONARException {
Vector pchildren = timeParemeter.getChildrenByType("time");
Element subelement = null;
@@ -83,7 +81,7 @@
return null;
if (!subelement.getLocalName().equals("time"))
- throw new DataFormatException(
+ throw new PerfSONARException(
"error.parameter",
"TimeDateUtil._getUnixTime: wrong type of parameter; "
+ "it should be time type");
@@ -105,7 +103,7 @@
unixTimeString = Long.toString(dt.getMillis()/1000);
} catch (Exception ex) {
- throw new DataFormatException(
+ throw new PerfSONARException(
"error.parameter",
"TimeDateUtil._getUnixTime: ISO time coversion is
wrong; "
+ ex.toString());
@@ -113,7 +111,7 @@
} else {
- throw new DataFormatException(
+ throw new PerfSONARException(
"error.parameter",
"TimeDateUtil._getUnixTime: "
+ "Time type " + time.getType() + "is not supported");
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/util/XMLUtils.java
===================================================================
--- branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/util/XMLUtils.java
2007-05-21 14:47:44 UTC (rev 2407)
+++ branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/commons/util/XMLUtils.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -9,10 +9,9 @@
import java.io.IOException;
import java.io.StringReader;
import java.io.StringWriter;
-
+import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
-import java.util.HashMap;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
@@ -20,15 +19,10 @@
import org.apache.xml.serialize.OutputFormat;
import org.apache.xml.serialize.XMLSerializer;
-
import org.ggf.ns.nmwg.base.v2_0.Element;
import org.ggf.ns.nmwg.base.v2_0.Handler;
import org.ggf.ns.nmwg.base.v2_0.Message;
-
import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-
import org.w3c.dom.Document;
import org.xml.sax.ContentHandler;
import org.xml.sax.InputSource;
@@ -117,7 +111,7 @@
* @return XML document as String
*/
public static String serializeXML(Element element)
- throws SystemException {
+ throws PerfSONARException {
OutputFormat outputFormat = new OutputFormat("XML", "UTF-8", true);
outputFormat.setIndent(1);
@@ -141,7 +135,7 @@
} catch (Exception e) {
String m = "XMLUtils.serializeXML: error while serializing XML:
"+
e.getMessage();
- throw new SystemException(m);
+ throw new PerfSONARException(m);
}
}
@@ -166,7 +160,7 @@
else return builtDoc;
} catch (Exception e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.parse_error",
"Cannot convert Message to DOM");
}
@@ -223,25 +217,25 @@
} catch(SAXException e) {
- throw new RequestException("error.common.parse_error",
+ throw new PerfSONARException("error.common.parse_error",
"Request couldnot be parsed because "
+ "of SAX exception. Error message: "
+ e.getMessage());
}
} catch (IOException e) {
- throw new SystemException("error.common.parse_error",
+ throw new PerfSONARException("error.common.parse_error",
"IO exception: "
+ "encountered while reading schema file "
+ e.getMessage());
} catch (SAXException e) {
- throw new SystemException("error.common.parse_error",
+ throw new PerfSONARException("error.common.parse_error",
"SAX Exception: "
+ e.getMessage());
} catch (ParserConfigurationException e) {
- throw new SystemException("error.common.parse_error", "Parser
Configuration "
+ throw new PerfSONARException("error.common.parse_error", "Parser
Configuration "
+ "Exception " + e.getMessage());
}
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/authn/AADispatchProtocolFactory.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/authn/AADispatchProtocolFactory.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/authn/AADispatchProtocolFactory.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -1,9 +1,9 @@
package org.perfsonar.service.commons.authn;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
public class AADispatchProtocolFactory {
- public static AADispatchProtocol getDefaultAADispatchProtocol()
throws SystemException {
+ public static AADispatchProtocol getDefaultAADispatchProtocol()
throws PerfSONARException {
return new AADispatchSOAPProtocol();
}
}
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/authn/AADispatchSOAPProtocol.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/authn/AADispatchSOAPProtocol.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/authn/AADispatchSOAPProtocol.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -4,7 +4,7 @@
import org.perfsonar.commons.auxiliary.ComponentNames;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
public class AADispatchSOAPProtocol implements AADispatchProtocol {
private final String AUTHN_DECISION = "service.authn.response";
@@ -12,22 +12,22 @@
private ConfigurationComponent config;
private boolean isAuthorized=false;
- public AADispatchSOAPProtocol() throws SystemException {
+ public AADispatchSOAPProtocol() throws PerfSONARException {
try {
logger = (LoggerComponent)
AuxiliaryComponentManager.getInstance()
.getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
String m = "AADispatchSOAPProtocol: Can't obtain
Logger component ";
- throw new SystemException(m);
+ throw new PerfSONARException(m);
}
try {
config = (ConfigurationComponent)
AuxiliaryComponentManager
.getInstance().getComponent(ComponentNames.CONFIG);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
String m = "AADispatchSOAPProtocol: Can't obtain
Config component ";
logger.error(m);
- throw new SystemException(m);
+ throw new PerfSONARException(m);
}
try {
Boolean
b=Boolean.valueOf(config.getProperty(AUTHN_DECISION));
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/authn/tokens/SecTokenManager.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/authn/tokens/SecTokenManager.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/authn/tokens/SecTokenManager.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -1,8 +1,8 @@
package org.perfsonar.service.commons.authn.tokens;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
public interface SecTokenManager {
- public boolean hasSTInRequest() throws SystemException;
- public Object getSTFromRequest() throws SystemException;
+ public boolean hasSTInRequest() throws PerfSONARException;
+ public Object getSTFromRequest() throws PerfSONARException;
}
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/authn/tokens/SecTokenManagerFactory.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/authn/tokens/SecTokenManagerFactory.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/authn/tokens/SecTokenManagerFactory.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -1,9 +1,9 @@
package org.perfsonar.service.commons.authn.tokens;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
public class SecTokenManagerFactory {
- public static SecTokenManager getDefaultSecTokenManager() throws
SystemException {
+ public static SecTokenManager getDefaultSecTokenManager() throws
PerfSONARException {
return new SecTokenSOAPManager();
}
}
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/authn/tokens/SecTokenSOAPManager.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/authn/tokens/SecTokenSOAPManager.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/authn/tokens/SecTokenSOAPManager.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -7,7 +7,7 @@
import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.ComponentNames;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.w3c.dom.NodeList;
public class SecTokenSOAPManager implements SecTokenManager {
@@ -15,16 +15,16 @@
private final String WSSECHEADER="Security";
private LoggerComponent logger = null;
- public SecTokenSOAPManager() throws SystemException {
+ public SecTokenSOAPManager() throws PerfSONARException {
logger = (LoggerComponent)
AuxiliaryComponentManager.getInstance().getComponent(ComponentNames.LOGGER);
if (logger == null) {
String m = "SecTokenSOAPManager: can't obtain Logger
object";
- throw new SystemException("error.authn.dependency",
m);
+ throw new
PerfSONARException("error.authn.dependency", m);
}
}
- public Object getSTFromRequest() throws SystemException {
+ public Object getSTFromRequest() throws PerfSONARException {
if (!hasSTInRequest())
return null;
MessageContext mc=MessageContext.getCurrentContext();
@@ -35,11 +35,11 @@
} catch (SOAPException e) {
String m = "Error checking the WS-SEC header";
logger.error(m);
- throw new SystemException("error.authn.checking", m);
+ throw new PerfSONARException("error.authn.checking", m);
}
}
- public boolean hasSTInRequest() throws SystemException {
+ public boolean hasSTInRequest() throws PerfSONARException {
MessageContext mc=MessageContext.getCurrentContext();
try {
SOAPHeader
sh=(SOAPHeader)mc.getCurrentMessage().getSOAPHeader();
@@ -48,7 +48,7 @@
} catch (SOAPException e) {
String m = "Error checking the WS-SEC header";
logger.error(m);
- throw new SystemException("error.authn.checking", m);
+ throw new PerfSONARException("error.authn.checking", m);
}
}
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/authn/tokens/SecurityToken.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/authn/tokens/SecurityToken.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/authn/tokens/SecurityToken.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -1,6 +1,6 @@
package org.perfsonar.service.commons.authn.tokens;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
public class SecurityToken {
private SecTokenManager tm;
@@ -19,11 +19,11 @@
this.secToken = secToken;
}
- public void setSecTokenFromRequest() throws SystemException {
+ public void setSecTokenFromRequest() throws PerfSONARException {
setSecToken(tm.getSTFromRequest());
}
- public boolean hasSecTokenInRequest() throws SystemException {
+ public boolean hasSecTokenInRequest() throws PerfSONARException {
return tm.hasSTInRequest();
}
}
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/engine/ServiceEngine.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/engine/ServiceEngine.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/engine/ServiceEngine.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -8,12 +8,8 @@
package org.perfsonar.service.commons.engine;
import org.ggf.ns.nmwg.base.v2_0.Message;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.ResourceException;
-
/**
* Interface specification for all types of Service Engines
*
@@ -48,5 +44,5 @@
*
*/
public Message takeAction(String actionType, Message request)
- throws SystemException, ResourceException, DataFormatException,
RequestException;
+ throws PerfSONARException;
}
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/engine/ServiceEngineFactory.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/engine/ServiceEngineFactory.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/engine/ServiceEngineFactory.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -8,7 +8,7 @@
import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.ComponentNames;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* Factory class which can be used to get ServiceEngine instances
@@ -29,11 +29,11 @@
*
* @return String type of Service Engine
*
- * @throws SystemException if an error was encountered while
+ * @throws PerfSONARException if an error was encountered while
* getting the instance
*/
public static ServiceEngine getServiceEngine(String engineClassName)
- throws SystemException {
+ throws PerfSONARException {
// get a logger
LoggerComponent logger = (LoggerComponent)AuxiliaryComponentManager.
@@ -51,7 +51,7 @@
// class not found
logger.fatal("ServiceEngineFactory: class not found for name: "
+ engineClassName);
- throw new SystemException("ServiceEngineFactory: ClassNotFound: "
+ throw new PerfSONARException("ServiceEngineFactory:
ClassNotFound: "
+ engineClassName);
}
@@ -69,7 +69,7 @@
"ServiceEngineFactory: class cast exception while "
+ "trying to instantiate: " + engineClassName);
- throw new SystemException("ServiceEngineFactory: class cast
exception while "
+ throw new PerfSONARException("ServiceEngineFactory: class cast
exception while "
+ "trying to instantiate: " + engineClassName);
@@ -79,14 +79,14 @@
"ServiceEngineFactory: class instantiaiton exception while "
+ "trying to instantiate: " + engineClassName);
- throw new SystemException("ServiceEngineFactory: class
instantiation "
+ throw new PerfSONARException("ServiceEngineFactory: class
instantiation "
+ "exception for " + engineClassName);
} catch (IllegalAccessException e1) {
logger.fatal("ServiceEngineFactory: class instantiation is
illegal "
+ "for: " + engineClassName);
- throw new SystemException("ServiceEngineFactory:
IllegalAccessException "
+ throw new PerfSONARException("ServiceEngineFactory:
IllegalAccessException "
+ "while instantiating "+engineClassName);
}
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/exceptions/AuthenticationException.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/exceptions/AuthenticationException.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/exceptions/AuthenticationException.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -8,7 +8,7 @@
/**
* @author loukik
- *
+ * @deprecated
* Class used for raising exceptions related to the client's request
*/
public class AuthenticationException extends PerfSONARException {
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/exceptions/DataFormatException.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/exceptions/DataFormatException.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/exceptions/DataFormatException.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -9,7 +9,7 @@
/**
* @author loukik
* @author Maciej Glowiak
- *
+ * @deprecated
* Class used for raising exceptions related to the format of data being
provided to the client
*/
public class DataFormatException extends PerfSONARException {
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/exceptions/RequestException.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/exceptions/RequestException.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/exceptions/RequestException.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -8,7 +8,7 @@
/**
* @author loukik
- *
+ * @deprecated
* Class used for raising exceptions related to the client's request
*/
public class RequestException extends PerfSONARException{
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/exceptions/ResourceException.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/exceptions/ResourceException.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/exceptions/ResourceException.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -8,7 +8,7 @@
/**
* @author loukik
- *
+ * @deprecated
* Class used for raising exceptions related to provisioning of resources
*/
public class ResourceException extends PerfSONARException {
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/exceptions/SystemException.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/exceptions/SystemException.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/exceptions/SystemException.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -9,7 +9,7 @@
/**
* @author loukik
* @author Maciej Glowiak
- *
+ * @deprecated
* Class used for raising exceptions when the cause of errors is the system
*/
public class SystemException extends PerfSONARException {
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/measurementExecutor/MeasurementExecutor.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/measurementExecutor/MeasurementExecutor.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/measurementExecutor/MeasurementExecutor.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -6,11 +6,8 @@
package org.perfsonar.service.commons.measurementExecutor;
import org.ggf.ns.nmwg.base.v2_0.Message;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-import org.perfsonar.service.commons.exceptions.ResourceException;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
/**
@@ -39,6 +36,6 @@
* @throws SystemException
* @throws RequestException
*/
- public Message makeMeasurement(Message request) throws
SystemException, RequestException, ResourceException, DataFormatException;
+ public Message makeMeasurement(Message request) throws
PerfSONARException;
}
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/registration/GenericServiceLSRegistrator.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/registration/GenericServiceLSRegistrator.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/registration/GenericServiceLSRegistrator.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -2,8 +2,6 @@
import java.util.Map;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.FactoryConfigurationError;
import javax.xml.parsers.ParserConfigurationException;
@@ -14,10 +12,7 @@
import org.perfsonar.commons.auxiliary.ComponentNames;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.commons.util.XMLUtils;
import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-import org.w3c.dom.Document;
/**
* Generic Service LS Registrator.
@@ -66,7 +61,7 @@
/**
* Initializes Registrator
*/
- public void initRegistrator() throws SystemException {
+ public void initRegistrator() throws PerfSONARException {
logger = (LoggerComponent)AuxiliaryComponentManager.
getInstance().getComponent(ComponentNames.LOGGER);
@@ -79,10 +74,10 @@
public Message register(String lsUrl) throws PerfSONARException {
- if (lsUrl==null) throw new SystemException(
+ if (lsUrl==null) throw new PerfSONARException(
"error.lsregistrator.no_ls_url",
"GenericServiceLSRegistrator: Lookup Service URL is null");
- if ("".equals(lsUrl)) throw new SystemException(
+ if ("".equals(lsUrl)) throw new PerfSONARException(
"error.lsregistrator.no_ls_url",
"GenericServiceLSRegistrator: Lookup Service URL is empty");
@@ -110,13 +105,13 @@
} catch (ParserConfigurationException e) {
logger.error("GenericServiceLSRegistrator: "+e.getMessage());
- throw new
SystemException("error.common.parse_error","GenericServiceLSRegistrator:
"+e.getMessage());
+ throw new
PerfSONARException("error.common.parse_error","GenericServiceLSRegistrator:
"+e.getMessage());
} catch (FactoryConfigurationError e) {
logger.error("GenericServiceLSRegistrator: "+e.getMessage());
- throw new
SystemException("error.common.parse_error","GenericServiceLSRegistrator:
"+e.getMessage());
+ throw new
PerfSONARException("error.common.parse_error","GenericServiceLSRegistrator:
"+e.getMessage());
} catch (Exception e) {
logger.error("GenericServiceLSRegistrator: "+e.getMessage());
- throw new
SystemException("error.lsregistrator.other","GenericServiceLSRegistrator:
Error while sending request to LS: "+e.getMessage());
+ throw new
PerfSONARException("error.lsregistrator.other","GenericServiceLSRegistrator:
Error while sending request to LS: "+e.getMessage());
}
}
@@ -151,7 +146,7 @@
throws PerfSONARException {
if (serviceDescription==null) throw new
-
SystemException("error.common.lsregistrator.no_service_description",
+
PerfSONARException("error.common.lsregistrator.no_service_description",
"No service description");
Map commonParameters = serviceDescription.getServiceDescription();
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/registration/LSRegistrationComponent.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/registration/LSRegistrationComponent.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/registration/LSRegistrationComponent.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -6,7 +6,6 @@
import org.ggf.ns.nmwg.base.v2_0.Message;
-
import org.perfsonar.commons.auxiliary.AuxiliaryComponent;
import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.ComponentNames;
@@ -14,16 +13,9 @@
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
import org.perfsonar.commons.auxiliary.components.simplescheduler.Scheduler;
import
org.perfsonar.commons.auxiliary.components.simplescheduler.SchedulerAction;
-
import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-import
org.perfsonar.service.commons.registration.GenericServiceLSRegistrator;
-import
org.perfsonar.service.commons.registration.InformationXMLFileServiceContent;
-import
org.perfsonar.service.commons.registration.PropertiesServiceDescription;
-import org.perfsonar.service.commons.registration.ServiceLSRegistrator;
-
/**
* Action for simple Scheduler that registers with the LS
*
@@ -68,7 +60,7 @@
- public LSRegistrationComponent() throws SystemException {
+ public LSRegistrationComponent() throws PerfSONARException {
try {
@@ -77,9 +69,9 @@
getInstance().
getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_logger",
"LSRegistrationComponent.initComponent: "
+ "Cannot get logger component");
@@ -94,9 +86,9 @@
getInstance().
getComponent(ComponentNames.CONFIG);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_configuration",
"LSRegistrationComponent.initComponent: "
+ "Cannot get config component");
@@ -168,7 +160,7 @@
// ---------------------- component that loads action to scheduler
- public void initComponent() throws SystemException {
+ public void initComponent() throws PerfSONARException {
//Get configuration
@@ -183,7 +175,7 @@
} catch (RuntimeException e) {
//possibly not an integer - keep default interval
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
//no property - keep default interval
}
@@ -210,13 +202,13 @@
getComponent(schedulerVal);
if (scheduler == null)
- throw new SystemException("error.common.no_scheduler",
+ throw new PerfSONARException("error.common.no_scheduler",
"LSRegistrationComponent.initComponent: "
+ "No scheduler component in
AuxiliaryComponentManager");
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException("error.common.no_scheduler",
+ throw new PerfSONARException("error.common.no_scheduler",
"LSRegistrationComponent.initComponent:"
+ "LSCleanupLoader: no [component."
+ componentName + ".scheduler_component] parameter. "
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/DataRepository.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/DataRepository.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/DataRepository.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -4,7 +4,7 @@
*/
package org.perfsonar.service.commons.storage;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* This interface defines the data repository.
@@ -31,13 +31,13 @@
/**
* Opens the acces to a data repository.
*/
- public void open() throws SystemException;
+ public void open() throws PerfSONARException;
/**
* Closes the acces to a data repository.
*/
- public void close() throws SystemException;
+ public void close() throws PerfSONARException;
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/GenericXmlStorageManager.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/GenericXmlStorageManager.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/GenericXmlStorageManager.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -5,10 +5,9 @@
package org.perfsonar.service.commons.storage;
-import org.perfsonar.service.commons.exceptions.SystemException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
+
/**
* This interface declares methods to have
* an access to a data storage.
@@ -25,14 +24,14 @@
* Fetches data from a data repository.
*/
public Object fetch(Object dataQuery)
- throws SystemException, RequestException, DataFormatException;
+ throws PerfSONARException;
/**
* Stores data in a data repository.
*/
public Object store(Object dataSet)
- throws SystemException, RequestException, DataFormatException;
+ throws PerfSONARException;
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/NMWGStorageManager.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/NMWGStorageManager.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/NMWGStorageManager.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -5,10 +5,9 @@
package org.perfsonar.service.commons.storage;
-import org.perfsonar.service.commons.exceptions.SystemException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
+
import org.ggf.ns.nmwg.base.v2_0.Message;
import org.ggf.ns.nmwg.base.v2_0.Key;
@@ -27,21 +26,21 @@
* Inits an object of this class with data repository object.
*/
public void initStorage(Key dataRepository)
- throws SystemException;
+ throws PerfSONARException;
/**
* Fetches data from a data repository.
*/
public Message fetch(Message dataQuery)
- throws SystemException, RequestException, DataFormatException;
+ throws PerfSONARException;
/**
* Stores data in a data repository.
*/
public Message store(Message dataSet)
- throws SystemException, RequestException, DataFormatException;
+ throws PerfSONARException;
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/StorageManager.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/StorageManager.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/StorageManager.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -5,10 +5,9 @@
package org.perfsonar.service.commons.storage;
-import org.perfsonar.service.commons.exceptions.SystemException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
+
/**
* This interface declares methods to have
* an access to a data storage.
@@ -23,21 +22,21 @@
* Inits an object of this class with data repository object.
*/
public void initStorage(DataRepository dataRepository)
- throws SystemException;
+ throws PerfSONARException;
/**
* Fetches data from a data repository.
*/
public Object fetch(Object dataQuery)
- throws SystemException, RequestException, DataFormatException;
+ throws PerfSONARException;
/**
* Stores data in a data repository.
*/
public Object store(Object dataSet)
- throws SystemException, RequestException, DataFormatException;
+ throws PerfSONARException;
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmldb/XmlDbDataRepository.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmldb/XmlDbDataRepository.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmldb/XmlDbDataRepository.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -3,7 +3,7 @@
import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.ComponentNames;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.storage.DataRepository;
/**
@@ -50,7 +50,7 @@
try {
logger = (LoggerComponent)AuxiliaryComponentManager.
getInstance().getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
}
logger.debug("XmlDbDataRepository: created");
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmldb/exist/ExistDbFactory.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmldb/exist/ExistDbFactory.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmldb/exist/ExistDbFactory.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -4,7 +4,7 @@
import org.perfsonar.commons.auxiliary.ComponentNames;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.storage.xmldb.XmlDbDataRepository;
import org.perfsonar.service.commons.storage.xmldb.XmlDbStorageManager;
import
org.perfsonar.service.commons.storage.xmldb.exist.rest.ExistDbHttpXmlDataRepository;
@@ -25,7 +25,7 @@
String type,
String uriPropName,
String usernamePropName,
- String passwordPropName) throws SystemException {
+ String passwordPropName) throws PerfSONARException {
LoggerComponent logger = getLogger();
ConfigurationComponent configuration = getConfig();
@@ -70,7 +70,7 @@
public static XmlDbStorageManager getXMLStorageManager(
String type,
XmlDbDataRepository dataRepository )
- throws SystemException {
+ throws PerfSONARException {
XmlDbStorageManager sm = null;
LoggerComponent logger = getLogger();
@@ -105,7 +105,7 @@
// ---------------------------------------- private static methods
private static LoggerComponent getLogger()
- throws SystemException {
+ throws PerfSONARException {
return (LoggerComponent)AuxiliaryComponentManager.
getInstance().getComponent(ComponentNames.LOGGER);
@@ -114,7 +114,7 @@
private static ConfigurationComponent getConfig()
- throws SystemException {
+ throws PerfSONARException {
return (ConfigurationComponent)AuxiliaryComponentManager.
getInstance().getComponent(ComponentNames.CONFIG);
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmldb/exist/ExistDbGenericStorageManager.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmldb/exist/ExistDbGenericStorageManager.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmldb/exist/ExistDbGenericStorageManager.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -7,7 +7,7 @@
import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.ComponentNames;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.storage.xmldb.XmlDbConstants;
import org.perfsonar.service.commons.storage.xmldb.XmlDbStorageManager;
@@ -82,7 +82,7 @@
}
- protected LoggerComponent getLogger() throws SystemException {
+ protected LoggerComponent getLogger() throws PerfSONARException {
if (logger==null) {
//get logger
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmldb/exist/rest/ExistDbHttpXmlDataRepository.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmldb/exist/rest/ExistDbHttpXmlDataRepository.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmldb/exist/rest/ExistDbHttpXmlDataRepository.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -1,6 +1,6 @@
package org.perfsonar.service.commons.storage.xmldb.exist.rest;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.storage.xmldb.XmlDbDataRepository;
public class ExistDbHttpXmlDataRepository extends XmlDbDataRepository {
@@ -24,8 +24,8 @@
}
- public void open() throws SystemException {};
+ public void open() throws PerfSONARException {};
- public void close() throws SystemException {};
+ public void close() throws PerfSONARException {};
}
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmldb/exist/rest/ExistDbHttpXmlStorageManager.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmldb/exist/rest/ExistDbHttpXmlStorageManager.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmldb/exist/rest/ExistDbHttpXmlStorageManager.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -2,9 +2,7 @@
import org.perfsonar.commons.auxiliary.AuxiliaryComponent;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.storage.DataRepository;
import org.perfsonar.service.commons.storage.xmldb.XmlDbConstants;
import org.perfsonar.service.commons.storage.xmldb.XmlDbDataRepository;
@@ -64,10 +62,10 @@
/**
* Set data repository for this Storage Manager.
* Important note: DataRepository MUST be XmlDbDataRepository. Otherwise,
- * a SystemException will be thrown!
+ * a PerfSONARException will be thrown!
*/
public void initStorage(DataRepository dataRepository)
- throws SystemException {
+ throws PerfSONARException {
try {
@@ -86,7 +84,7 @@
}
- public void initComponent() throws SystemException {
+ public void initComponent() throws PerfSONARException {
dataRepository = ExistDbFactory.getDataRepositoryByProperties(
ExistDbFactory.EXIST_HTTP,
@@ -108,7 +106,7 @@
* @return depends on getResultType()
*/
public Object fetch(Object dataQuery)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
return xqueryHttp(dataQuery);
@@ -122,7 +120,7 @@
* @return depends on getResultType()
*/
public Object store(Object dataSet)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
return xupdateHttp(dataSet);
@@ -133,7 +131,7 @@
protected Object xqueryHttp(Object query)
- throws SystemException {
+ throws PerfSONARException {
getLogger().debug("ExistDbHttpXmlStorageManager: XQuery");
XmlDbResult results = null;
@@ -148,7 +146,7 @@
ExistDbHTTPAccess.ALL_RESULTS);
} catch (Exception ex) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.storage.xmldb.open",
"XQuery by HTTP failed. "
+ "Could not connect to eXist via pure http, "
@@ -166,7 +164,7 @@
protected Object xupdateHttp(Object xml)
- throws SystemException {
+ throws PerfSONARException {
getLogger().debug("ExistDbHttpXmlStorageManager: XUpdate");
int results;
@@ -179,7 +177,7 @@
((XmlDbDataRepository)dataRepository).getDbPassword());
} catch (Exception ex) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.storage.xmldb.open",
"XUpdate by HTTP failed. "
+ "Could not connect to eXist via pure http, "
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmldb/exist/xmlrpc/ExistDbXmlrpcXmlDataRepository.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmldb/exist/xmlrpc/ExistDbXmlrpcXmlDataRepository.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmldb/exist/xmlrpc/ExistDbXmlrpcXmlDataRepository.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -1,6 +1,6 @@
package org.perfsonar.service.commons.storage.xmldb.exist.xmlrpc;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.storage.xmldb.XmlDbDataRepository;
import org.xmldb.api.DatabaseManager;
import org.xmldb.api.base.Collection;
@@ -135,7 +135,7 @@
}
- public void open() throws SystemException {
+ public void open() throws PerfSONARException {
logger.debug("ExistDbXmlrpcXmlDataRepository: connect");
@@ -151,20 +151,20 @@
dbUri, dbUsername, dbPassword);
} catch (ClassNotFoundException e) {
- throw new SystemException("error.common.storage.xmldb.open",
+ throw new
PerfSONARException("error.common.storage.xmldb.open",
"ExistDbXmlrpcXmlDataRepository: Can't find eXist DB
XML driver "
+dbDriverClassname+", "+e.getMessage());
} catch (InstantiationException e) {
- throw new SystemException("error.common.storage.xmldb.open",
+ throw new
PerfSONARException("error.common.storage.xmldb.open",
"ExistDbXmlrpcXmlDataRepository: " +
"Can't create eXist DB XML driver instance "
+dbDriverClassname+", "+e.getMessage());
} catch (IllegalAccessException e) {
- throw new SystemException("error.common.storage.xmldb.open",
+ throw new
PerfSONARException("error.common.storage.xmldb.open",
"ExistDbXmlrpcXmlDataRepository: " +
"IllegalAccessException, "+e.getMessage());
} catch (XMLDBException e) {
- throw new SystemException("error.common.storage.xmldb.open",
+ throw new
PerfSONARException("error.common.storage.xmldb.open",
"ExistDbXmlrpcXmlDataRepository: XML DB Exception
"+e.getMessage());
}
@@ -179,7 +179,7 @@
}
- public void close() throws SystemException {
+ public void close() throws PerfSONARException {
if (existDatabase!=null) {
@@ -191,7 +191,7 @@
existCollection=null;
} catch (XMLDBException e) {
- throw new SystemException("error.common.storage.xmldb.close",
+ throw new
PerfSONARException("error.common.storage.xmldb.close",
"ExistDbXmlrpcXmlDataRepository: Can't deregister
database, "
+e.getMessage());
}
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmldb/exist/xmlrpc/ExistDbXmlrpcXmlStorageManager.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmldb/exist/xmlrpc/ExistDbXmlrpcXmlStorageManager.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmldb/exist/xmlrpc/ExistDbXmlrpcXmlStorageManager.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -3,9 +3,7 @@
import java.util.Vector;
import org.perfsonar.commons.auxiliary.AuxiliaryComponent;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.storage.DataRepository;
import org.perfsonar.service.commons.storage.StorageManager;
import org.perfsonar.service.commons.storage.xmldb.XmlDbConstants;
@@ -70,9 +68,9 @@
/**
* Set data repository for this Storage Manager.
* Important note: DataRepository MUST be
ExistDbXmlrpcXmlDataRepository. Otherwise,
- * a SystemException will be thrown!
+ * a PerfSONARException will be thrown!
*/
- public void initStorage(DataRepository dataRepository) throws
SystemException {
+ public void initStorage(DataRepository dataRepository) throws
PerfSONARException {
getLogger().debug("ExistDbXmlrpcXmlStorageManager: initStorage with
data repository");
@@ -91,7 +89,7 @@
}
- public void initComponent() throws SystemException {
+ public void initComponent() throws PerfSONARException {
getLogger().debug("ExistDbXmlrpcXmlStorageManager: initComponent");
@@ -118,8 +116,7 @@
* @param dataQuery Must be String that contain XPath/XQuery expression
* @return always StringArrayDataSet object
*/
- public Object fetch(Object dataQuery) throws SystemException,
- RequestException, DataFormatException {
+ public Object fetch(Object dataQuery) throws PerfSONARException {
getLogger().debug("ExistXMLDatabaseAccess: perform XQuery");
@@ -127,13 +124,13 @@
try {
xqueryExpression = (String)dataQuery;
} catch (ClassCastException ex) {
- throw new
DataFormatException("error.common.storage.xmldb.wrong_query",
+ throw new
PerfSONARException("error.common.storage.xmldb.wrong_query",
"ExistDbXmlrpcXmlStorageManager: This method accepts " +
"StringData data format only");
}
if (xqueryExpression==null) {
- throw new
DataFormatException("error.common.storage.xmldb.empty_query",
+ throw new
PerfSONARException("error.common.storage.xmldb.empty_query",
"ExistDbXmlrpcXmlStorageManager: Input DataQuery " +
"contains no data");
}
@@ -177,7 +174,7 @@
}
} catch (XMLDBException e) {
- throw new SystemException("error.common.storage.xmldb.query",
+ throw new PerfSONARException("error.common.storage.xmldb.query",
"Can't perform XQuery: "+e.getMessage());
}
@@ -190,8 +187,7 @@
* @param dataSet Must be String, contains XUpdate string
* @return null
*/
- public Object store(Object dataSet) throws SystemException,
- RequestException, DataFormatException {
+ public Object store(Object dataSet) throws PerfSONARException {
getLogger().debug("ExistDbXmlrpcXmlStorageManager: perform
XUpdate");
@@ -202,13 +198,13 @@
xupdateExpression = (String)dataSet;
} catch (ClassCastException ex) {
- throw new
DataFormatException("error.common.storage.xmldb.wrong_query",
+ throw new
PerfSONARException("error.common.storage.xmldb.wrong_query",
"ExistDbXmlrpcXmlStorageManager: This method accepts " +
"StringData data format only");
}
if (xupdateExpression==null) {
- throw new
DataFormatException("error.common.storage.xmldb.empty_query",
+ throw new
PerfSONARException("error.common.storage.xmldb.empty_query",
"ExistDbXmlrpcXmlStorageManager: Input DataQuery " +
"contains no data");
}
@@ -226,7 +222,7 @@
disconnect();
} catch (XMLDBException e) {
- throw new SystemException("error.common.storage.xmldb.query",
+ throw new PerfSONARException("error.common.storage.xmldb.query",
"ExistDbXmlrpcXmlStorageManager: Can't perform XUpdate:
"+e.getMessage());
}
@@ -265,7 +261,7 @@
/**
* Connect if required
*/
- private void connect() throws SystemException {
+ private void connect() throws PerfSONARException {
if (!isConnected) {
@@ -278,9 +274,9 @@
/**
* Disconnect if required
- * @throws SystemException
+ * @throws PerfSONARException
*/
- private void disconnect() throws SystemException {
+ private void disconnect() throws PerfSONARException {
if ((isConnected) && (!keepConnection)) {
@@ -297,7 +293,7 @@
/*
* Run query test (XPath/XQuery)
*/
- private static void testQuery(StorageManager storageManager, String
xquery) throws SystemException, RequestException, DataFormatException {
+ private static void testQuery(StorageManager storageManager, String
xquery) throws PerfSONARException {
String[] result = (String[])storageManager.fetch(
xquery);
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmlfile/XmlFileDataRepository.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmlfile/XmlFileDataRepository.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmlfile/XmlFileDataRepository.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -1,6 +1,6 @@
package org.perfsonar.service.commons.storage.xmlfile;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.storage.DataRepository;
public class XmlFileDataRepository implements DataRepository {
@@ -22,10 +22,10 @@
return XML_FILE_TYPE;
}
- public void open() throws SystemException {
+ public void open() throws PerfSONARException {
}
- public void close() throws SystemException {
+ public void close() throws PerfSONARException {
}
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmlfile/XmlFileStorageManager.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmlfile/XmlFileStorageManager.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/commons/storage/xmlfile/XmlFileStorageManager.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -12,11 +12,10 @@
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
+
import org.apache.xpath.domapi.XPathEvaluatorImpl;
import org.perfsonar.commons.util.StringBufferOutputStream;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.storage.DataRepository;
import org.perfsonar.service.commons.storage.StorageManager;
import org.w3c.dom.Document;
@@ -43,12 +42,12 @@
* Accepts XmlFileDataRepository
*/
public void initStorage(DataRepository dataRepository)
- throws SystemException {
+ throws PerfSONARException {
try {
this.dataRepository = (XmlFileDataRepository)dataRepository;
} catch (RuntimeException ex) {
- throw new SystemException("error.common.storage.xml_file.init",
+ throw new
PerfSONARException("error.common.storage.xml_file.init",
"XmlFileStorageManager: not XmlFileDataRepository!");
}
@@ -61,7 +60,7 @@
* @return String[] XML results
*/
public Object fetch(Object dataQuery)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
//check if string
String xpathQuery = null;
@@ -69,7 +68,7 @@
xpathQuery = (String)dataQuery;
} catch (RuntimeException ex) {
//not a string
- throw new DataFormatException(
+ throw new PerfSONARException(
"XmlFileStorageManager: not a String parameter!");
}
@@ -141,7 +140,7 @@
//XX }
} catch (Exception ex) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.storage.xml_file.fetch",
ex.getMessage());
}
@@ -159,10 +158,9 @@
/**
* UNIMPLEMENTED
*/
- public Object store(Object dataSet) throws SystemException,
- RequestException, DataFormatException {
+ public Object store(Object dataSet) throws PerfSONARException {
- throw new SystemException("not implemented");
+ throw new PerfSONARException("not implemented");
}
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/eventTypeConfig/EventType.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/eventTypeConfig/EventType.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/eventTypeConfig/EventType.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -24,6 +24,7 @@
private String metadataQueryGenerator = null;
private String responseGenerator = null;
private String storeRequestProcess = null;
+ private String baseChainingMerger = null;
@@ -96,5 +97,19 @@
}
+ public void setBaseChainingMerger(String baseChainingMerger) {
+ this.baseChainingMerger = baseChainingMerger;
+
+ }
+
+
+ public String getBaseChainingMerger() {
+
+ return baseChainingMerger;
+
+ }
+
+
+
} //EventType
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/eventTypeConfig/EventTypeConfiguration.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/eventTypeConfig/EventTypeConfiguration.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/eventTypeConfig/EventTypeConfiguration.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -58,5 +58,12 @@
}
+ public Map getEventTypeMap() {
+ return eventTypeMap;
+
+ }
+
+
+
} //EventTypeConfiguration
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/eventTypeConfig/EventTypeConfigurationComponent.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/eventTypeConfig/EventTypeConfigurationComponent.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/eventTypeConfig/EventTypeConfigurationComponent.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -10,7 +10,7 @@
import org.perfsonar.commons.auxiliary.ComponentNames;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.apache.commons.digester.Digester;
import org.apache.commons.digester.xmlrules.DigesterLoader;
@@ -55,7 +55,7 @@
- public EventTypeConfigurationComponent() throws SystemException {
+ public EventTypeConfigurationComponent() throws PerfSONARException {
try {
@@ -64,9 +64,9 @@
getInstance().
getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_logger",
"EventTypeConfigurationComponent.initComponent: "
+ "Cannot get logger component");
@@ -81,7 +81,7 @@
- public void initComponent() throws SystemException {
+ public void initComponent() throws PerfSONARException {
// getting configuration data using commons digester
@@ -96,7 +96,7 @@
if (digesterRulesURL == null) {
logger.debug("EventTypeConfigurationComponent.initComponent: "
+ "Could not find xml config file " + digesterRules);
- throw new SystemException(
+ throw new PerfSONARException(
"error.common",
"EventTypeConfigurationComponent.initComponent: "
+ "Could not find xml config file " + digesterRules);
@@ -113,7 +113,7 @@
if (digesterInputStream == null) {
logger.debug("EventTypeConfigurationComponent.initComponent: "
+ "Could not find xml file " + digesterInput);
- throw new SystemException(
+ throw new PerfSONARException(
"error.common",
"EventTypeConfigurationComponent.initComponent: "
+ "Could not create an input stream of xml config file "
@@ -137,7 +137,7 @@
logger.debug("EventTypeConfigurationComponent.initComponent: "
+ "Could not parse " + digesterInput
+ ": " + ex.toString());
- throw new SystemException(
+ throw new PerfSONARException(
"error.common",
"EventTypeConfigurationComponent.initComponent: "
+ "Could not parse " + digesterInput);
@@ -168,5 +168,12 @@
}
+ public EventTypeConfiguration getEventTypeConfiguration() {
-} //EventTypeConfigurationComponent
+ return eventTypeConfiguration;
+
+ }
+
+
+
+} //EventTypeConfigurationComponent
\ No newline at end of file
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-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/MetadataConfigurationStorageManager.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -5,33 +5,26 @@
package org.perfsonar.service.measurementArchive.metadataConfig;
-import org.perfsonar.commons.auxiliary.AuxiliaryComponent;
+import java.util.Collection;
+import java.util.Map;
+
+import org.ggf.ns.nmwg.base.v2_0.Data;
+import org.ggf.ns.nmwg.base.v2_0.Element;
+import org.ggf.ns.nmwg.base.v2_0.Key;
+import org.ggf.ns.nmwg.base.v2_0.Message;
+import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.ComponentNames;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-
-import org.perfsonar.service.commons.exceptions.SystemException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-
-import org.perfsonar.service.commons.storage.StorageManager;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.storage.NMWGStorageManager;
-
+import org.perfsonar.service.commons.storage.StorageManager;
import org.perfsonar.service.commons.storage.xmldb.XmlDbDataRepository;
import org.perfsonar.service.commons.storage.xmldb.XmlDbStorageManager;
import org.perfsonar.service.commons.storage.xmldb.exist.ExistDbFactory;
-import org.ggf.ns.nmwg.base.v2_0.Element;
-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.Data;
-import org.ggf.ns.nmwg.base.v2_0.Key;
-import java.util.Map;
-import java.util.Collection;
-
-
/**
* This class contains methods to manage metadata configuration data.
*
@@ -59,7 +52,7 @@
- public MetadataConfigurationStorageManager() throws SystemException {
+ public MetadataConfigurationStorageManager() throws PerfSONARException {
try {
@@ -68,9 +61,9 @@
getInstance().
getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_logger",
"MetadataConfigurationStorageManager.constructor: "
+ "Cannot get logger component");
@@ -84,9 +77,9 @@
getInstance().
getComponent(ComponentNames.CONFIG);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_configuration",
"MetadataConfigurationStorageManager.constructor: "
+ "Cannot get config component");
@@ -107,7 +100,7 @@
// --- methods from NMWGStorageManager interface
- public void initStorage(Key dataRepository) throws SystemException {
+ public void initStorage(Key dataRepository) throws PerfSONARException {
this.existDbXmlStorageManager = getStorageManager();
@@ -115,7 +108,7 @@
public Message fetch(Message dataQuery)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
Message message = new Message();
@@ -130,7 +123,7 @@
// if query is an empty string then the method returns empty message
if (query.trim() == "")
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.query",
"MetadataConfigurationStorageManager.fetch: "
+ "Empty query to get data from the metadata
configuration");
@@ -143,14 +136,14 @@
logger.error("MetadataConfigurationStorageManager.fetch: "
+ "Connection to xml database failed: "
+ ex.toString());
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.storage.xmldb",
"MetadataConfigurationStorageManager.fetch: "
+ "Connection to xml database failed");
}
String[] xmlResults = (String[]) object;
if (xmlResults == null)
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma",
"MetadataConfigurationStorageManager.fetch: "
+ "Result array of metadata search in null");
@@ -162,14 +155,14 @@
if (xmlResults.length == 0)
- throw new SystemException(
+ throw new PerfSONARException(
"warning.ma.metadata_configuration",
"MetadataConfigurationStorageManager.fetch: "
+ "No metadata in the metadata configuration");
if (xmlResults.length == 1)
if (xmlResults[0].trim().equals(""))
- throw new SystemException(
+ throw new PerfSONARException(
"warning.ma.metadata_configuration",
"MetadataConfigurationStorageManager.fetch: "
+ "No metadata in the metadata configuration");
@@ -192,7 +185,7 @@
transformations.transformResults(xmlResult, tagNames);
if (elements == null)
- throw new SystemException(
+ throw new PerfSONARException(
"warning.ma.metadata_configuration",
"MetadataConfigurationStorageManager.fetch: "
+ "No metadata or data elements in the fetch result "
@@ -212,7 +205,7 @@
public Message store(Message dataSet)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
Data data = (Data) dataSet.getDataArray()[0];
@@ -220,7 +213,7 @@
if (data == null) {
logger.error("MetadataConfigurationStorageManager.store: "
+ "No data element to store");
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.query",
"MetadataConfigurationStorageManager.store: "
+ "No data block in the message to store data");
@@ -246,7 +239,7 @@
logger.error("MetadataConfigurationStorageManager.store: "
+ " No metadata block to store refering to "
+ data.getMetadataIdRef());
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.query",
"MetadataConfigurationStorageManager.store: "
+ "No metadata block in the message to store refering to
"
@@ -280,7 +273,7 @@
protected XmlDbStorageManager getStorageManager()
- throws SystemException {
+ throws PerfSONARException {
String xmldbAccess = "http";
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/SimpleMetadataConfigurationStorageManager.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/SimpleMetadataConfigurationStorageManager.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/SimpleMetadataConfigurationStorageManager.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -10,9 +10,7 @@
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.storage.NMWGStorageManager;
@@ -84,7 +82,7 @@
- public SimpleMetadataConfigurationStorageManager() throws
SystemException {
+ public SimpleMetadataConfigurationStorageManager() throws
PerfSONARException {
try {
@@ -94,9 +92,9 @@
getInstance().
getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_logger",
"SimpleMetadataConfigurationStorageManager.constructor: "
+ "Cannot get logger component");
@@ -110,9 +108,9 @@
getInstance().
getComponent(ComponentNames.CONFIG);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_configuration",
"SimpleMetadataConfigurationStorageManager.constructor: "
+ "Cannot get config component");
@@ -133,7 +131,7 @@
// --- methods from NMWGStorageManager interface
- public void initStorage(Key dataRepository) throws SystemException {
+ public void initStorage(Key dataRepository) throws PerfSONARException {
if (dataRepository == null)
this.xmlFile = configuration.getProperty("service.ma.conf_file");
@@ -148,7 +146,7 @@
public Message fetch(Message dataQuery)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
Message message = new Message();
@@ -194,7 +192,7 @@
transformations.transformResults(output, tagNames);
if (elements == null)
- throw new SystemException(
+ throw new PerfSONARException(
"warning.ma.metadata_configuration",
"SimpleMetadataConfigurationStorageManager.fetch: "
+ "No metadata in metadata configuration file");
@@ -220,7 +218,7 @@
"SimpleMetadataConfigurationStorageManager.fetch: "
+ "Unable to complete xquery/xpath query; "
+ xpex.toString());
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.fetching",
"SimpleMetadataConfigurationStorageManager.fetch: "
+ "Unable to complete xquery/xpath query; "
@@ -232,7 +230,7 @@
"SimpleMetadataConfigurationStorageManager.fetch: "
+ "Unable to complete fetch operation; "
+ ioex.toString());
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.fetching",
"SimpleMetadataConfigurationStorageManager.fetch: "
+ "Unable to complete fetch operation; "
@@ -246,13 +244,13 @@
public Message store(Message dataSet)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
// This method is not implemented in
SimpleMetadataConfigurationStorageManager
// class. If you want this functionality you must take
RRDConfigurationStorageManager
// and configure xml db (eXist).
- throw new SystemException(
+ throw new PerfSONARException(
"warning.ma.writing",
"SimpleMetadataConfigurationStorageManager.store: "
+ "Writing is not supported");
@@ -284,7 +282,7 @@
public SequenceIterator getQueryResult(
- String query, Configuration saxonConfig) throws SystemException {
+ String query, Configuration saxonConfig) throws PerfSONARException {
StaticQueryContext staticContext = new
StaticQueryContext(saxonConfig);
SequenceIterator elements = null;
@@ -303,7 +301,7 @@
"SimpleMetadataConfigurationStorageManager.getQueryResult: "
+ "Unable to complete xquery/xpath query; "
+ ex.toString());
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.fetching",
"SimpleMetadataConfigurationStorageManager.getQueryResult: "
+ "Unable to complete xquery/xpath query; "
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-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/Transformations.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -5,23 +5,17 @@
package org.perfsonar.service.measurementArchive.metadataConfig;
-import org.perfsonar.commons.util.XMLUtils;
-
import java.util.Map;
+import org.ggf.ns.nmwg.base.v2_0.Element;
+import org.ggf.ns.nmwg.base.v2_0.Message;
+import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.ComponentNames;
-import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
-
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
+import org.perfsonar.commons.util.XMLUtils;
import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-
-import org.ggf.ns.nmwg.base.v2_0.Element;
-import org.ggf.ns.nmwg.base.v2_0.Message;
-import org.ggf.ns.nmwg.base.v2_0.Metadata;
-
import
org.perfsonar.service.measurementArchive.metadataConfig.queryGenerator.MetadataQueryGenerator;
import
org.perfsonar.service.measurementArchive.metadataConfig.queryGenerator.MetadataQueryGeneratorFactory;
@@ -51,7 +45,7 @@
- public Transformations() throws SystemException {
+ public Transformations() throws PerfSONARException {
try {
@@ -60,9 +54,9 @@
getInstance().
getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_logger",
"Transformations.constructor: "
+ "Cannot get logger component");
@@ -76,9 +70,9 @@
getInstance().
getComponent(ComponentNames.CONFIG);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_configuration",
"Transformations.constructor: "
+ "Cannot get config component");
@@ -98,7 +92,7 @@
* stored in Message object.
*/
public String getMetadataQuery(Message query)
- throws SystemException, RequestException {
+ throws PerfSONARException {
//logger.debug("Transformations.getMetadataQuery: "
@@ -106,7 +100,7 @@
if (query == null)
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.query",
"Transformations.getMetadataQuery: "
+ "Input message is null");
@@ -120,7 +114,7 @@
logger.error("Transformations.getMetadataQuery: "
+ "Unable to get metadata from message; "
+ ex.toString());
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"Transformations.getMetadataQuery: "
+ "Unable to get metadata from message; "
@@ -135,7 +129,7 @@
eventType =
(metadata.getEventType() != null ?
metadata.getEventType().getEventType().trim() : "");
} catch (NullPointerException npex) {
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"Transformations.getMetadataQuery: "
+ "eventType in the request is null");
@@ -143,7 +137,7 @@
} else {
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"Transformations.getMetadataQuery: "
+ "metadata is missing in the request");
@@ -163,7 +157,7 @@
} catch (PerfSONARException pex) {
- throw new SystemException(pex.getResultCode(), pex.getMessage());
+ throw new PerfSONARException(pex.getResultCode(),
pex.getMessage());
} catch (Exception ex) {
@@ -172,7 +166,7 @@
+ "for the metadata configuration "
+ "from the request metadata. "
+ ex.toString());
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"Unable to generate xquery statement "
+ "for the metadata configuration "
@@ -190,13 +184,13 @@
* Returns nmwg objects with specific tag names parsed from xml string
*/
public Map<String, Element> transformResults(String xmlPart, String[]
tagNames)
- throws SystemException {
+ throws PerfSONARException {
String f = "";
try {
f = configuration.getProperty("service.sax_parser.config");
- } catch (SystemException sex) {
- throw new SystemException(
+ } catch (PerfSONARException sex) {
+ throw new PerfSONARException(
"error.common.configuration",
"Transformations.transformResults: "
+ "Unable to read service.sax_parser.config property
properly");
@@ -208,7 +202,7 @@
public String serializeXML(Element element)
- throws SystemException {
+ throws PerfSONARException {
return XMLUtils.serializeXML(element);
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-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGenerator.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -5,24 +5,17 @@
package
org.perfsonar.service.measurementArchive.metadataConfig.queryGenerator;
-import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
-import org.perfsonar.commons.auxiliary.ComponentNames;
-import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-
-import org.perfsonar.service.commons.exceptions.SystemException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-
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.Data;
import org.ggf.ns.nmwg.base.v2_0.Subject;
-
+import org.ggf.ns.nmwg.topology.base.v3_0.Node;
import org.ggf.ns.nmwg.topology.l2.v3_0.Link;
-import org.ggf.ns.nmwg.topology.l2.v3_0.GlobalName;
+import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
+import org.perfsonar.commons.auxiliary.ComponentNames;
+import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.ggf.ns.nmwg.topology.base.v3_0.Node;
-
/**
* Transforms nmwg message into xquery/xpath
* (query to fetch metadata with L2 path status metric)
@@ -45,7 +38,7 @@
- public L2PathStatusQueryGenerator() throws SystemException {
+ public L2PathStatusQueryGenerator() throws PerfSONARException {
try {
@@ -54,9 +47,9 @@
getInstance().
getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_logger",
"L2PathStatusQueryGenerator.constructor: "
+ "Cannot get logger component");
@@ -76,7 +69,7 @@
* stored in Message object.
*/
public String getMetadataQuery(Message query)
- throws SystemException, RequestException {
+ throws PerfSONARException {
Metadata metadata = null;
@@ -88,7 +81,7 @@
"L2PathStatusQueryGenerator.getMetadataQuery: "
+ "Unable to get metadata from message; "
+ ex.toString());
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"L2PathStatusQueryGenerator.getMetadataQuery: "
+ "Unable to get metadata from message; "
@@ -209,7 +202,7 @@
logger.error(
"L2PathStatusQueryGenerator.getMetadataQuery: "
+ "No node element(s) in the request metadata");
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"L2PathStatusQueryGenerator.getMetadataQuery: "
+ "No node element(s) in the request metadata");
@@ -218,7 +211,7 @@
logger.error(
"L2PathStatusQueryGenerator.getMetadataQuery: "
+ "0 or more than 2 node element(s) in the request
metadata");
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"L2PathStatusQueryGenerator.getMetadataQuery: "
+ "0 or more than 2 node element(s) in the request
metadata");
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-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGeneratorTMP.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -5,24 +5,17 @@
package
org.perfsonar.service.measurementArchive.metadataConfig.queryGenerator;
-import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
-import org.perfsonar.commons.auxiliary.ComponentNames;
-import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-
-import org.perfsonar.service.commons.exceptions.SystemException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-
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.Data;
import org.ggf.ns.nmwg.base.v2_0.Subject;
-
+import org.ggf.ns.nmwg.topology.base.v3_0.Node;
import org.ggf.ns.nmwg.topology.l2.v3_0.Link;
-import org.ggf.ns.nmwg.topology.l2.v3_0.GlobalName;
+import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
+import org.perfsonar.commons.auxiliary.ComponentNames;
+import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.ggf.ns.nmwg.topology.base.v3_0.Node;
-
/**
* Transforms nmwg message into xquery/xpath
* (query to fetch metadata with L2 path status metric).
@@ -48,7 +41,7 @@
- public L2PathStatusQueryGeneratorTMP() throws SystemException {
+ public L2PathStatusQueryGeneratorTMP() throws PerfSONARException {
try {
@@ -57,9 +50,9 @@
getInstance().
getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_logger",
"L2PathStatusQueryGeneratorTMP.constructor: "
+ "Cannot get logger component");
@@ -79,7 +72,7 @@
* stored in Message object.
*/
public String getMetadataQuery(Message query)
- throws SystemException, RequestException {
+ throws PerfSONARException{
Metadata metadata = null;
@@ -91,7 +84,7 @@
"L2PathStatusQueryGeneratorTMP.getMetadataQuery: "
+ "Unable to get metadata from message; "
+ ex.toString());
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"L2PathStatusQueryGeneratorTMP.getMetadataQuery: "
+ "Unable to get metadata from message; "
@@ -212,7 +205,7 @@
logger.error(
"L2PathStatusQueryGeneratorTMP.getMetadataQuery: "
+ "No node element(s) in the request metadata");
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"L2PathStatusQueryGeneratorTMP.getMetadataQuery: "
+ "No node element(s) in the request metadata");
@@ -221,7 +214,7 @@
logger.error(
"L2PathStatusQueryGeneratorTMP.getMetadataQuery: "
+ "0 or more than 2 node element(s) in the request
metadata");
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"L2PathStatusQueryGeneratorTMP.getMetadataQuery: "
+ "0 or more than 2 node element(s) in the request
metadata");
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/MetadataQueryGenerator.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/MetadataQueryGenerator.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/MetadataQueryGenerator.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -5,9 +5,9 @@
package
org.perfsonar.service.measurementArchive.metadataConfig.queryGenerator;
-import org.perfsonar.service.commons.exceptions.SystemException;
-import org.perfsonar.service.commons.exceptions.RequestException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
+
import org.ggf.ns.nmwg.base.v2_0.Message;
@@ -25,7 +25,7 @@
* stored in Message object.
*/
public String getMetadataQuery(Message query)
- throws SystemException, RequestException;
+ throws PerfSONARException;
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/MetadataQueryGeneratorFactory.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/MetadataQueryGeneratorFactory.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/MetadataQueryGeneratorFactory.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -10,7 +10,7 @@
import org.perfsonar.commons.auxiliary.ComponentNames;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.measurementArchive.eventTypeConfig.EventType;
import
org.perfsonar.service.measurementArchive.eventTypeConfig.EventTypeConfigurationComponent;
@@ -31,7 +31,7 @@
* in order to fetch relevant metadata configuration.
*/
public static MetadataQueryGenerator getMetadataQueryGenerator(String
eventTypeName)
- throws SystemException {
+ throws PerfSONARException {
LoggerComponent logger = (LoggerComponent)
@@ -50,7 +50,7 @@
eventTypeConfigurationComponent.getEventType(eventTypeName);
if (eventType == null)
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.query",
"MetadataQueryGeneratorFactory.getMetadataQueryGenerator: "
+ "eventType " + eventTypeName + " is not supported");
@@ -64,7 +64,7 @@
// + className);
if (className == null || className.trim().equals(""))
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.metadata_query_mapping_configuration",
"MetadataQueryGeneratorFactory.getMetadataQueryGenerator: "
+ "Could not find class name for eventType "
@@ -86,7 +86,7 @@
+ "Unable to create an object of : "
+ className + ": "
+ ex.toString());
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.metadata_query_mapping_configuration",
"MetadataQueryGeneratorFactory.getMetadataQueryGenerator: "
+ "Unable to create an object of "
@@ -101,7 +101,7 @@
"MetadataQueryGeneratorFactory.getMetadataQueryGenerator: "
+ "Could not create a metadataQueryGenerator object for "
+ "eventType: " + eventTypeName);
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.metadata_query_mapping_configuration",
"MetadataQueryGeneratorFactory.getMetadataQueryGenerator: "
+ "Could not create a metadataQueryGenerator for "
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/OwampQueryGenerator.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/OwampQueryGenerator.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/OwampQueryGenerator.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -1,26 +1,19 @@
package
org.perfsonar.service.measurementArchive.metadataConfig.queryGenerator;
+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.Parameter;
+import org.ggf.ns.nmwg.base.v2_0.Parameters;
+import org.ggf.ns.nmwg.tools.owamp.v2_0.Subject;
+import org.ggf.ns.nmwg.topology.v2_0.EndPointPair;
import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.ComponentNames;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-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.Parameters;
-import org.ggf.ns.nmwg.base.v2_0.Parameter;
-import org.ggf.ns.nmwg.topology.v2_0.EndPointPair;
-import org.ggf.ns.nmwg.topology.v2_0.Dst;
-import org.ggf.ns.nmwg.topology.v2_0.Src;
-
-import org.ggf.ns.nmwg.tools.owamp.v2_0.Subject;
-
-
-
/**
* Transforms nmwg message into xquery/xpath
* (query to fetch metadata with owamp data)
@@ -45,7 +38,7 @@
- public OwampQueryGenerator() throws SystemException {
+ public OwampQueryGenerator() throws PerfSONARException {
try {
@@ -53,9 +46,9 @@
AuxiliaryComponentManager.
getInstance().
getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_logger",
"OwampQueryGenerator.constructor: "
+ "Cannot get logger component");
@@ -75,11 +68,11 @@
* stored in Message object.
*/
public String getMetadataQuery(Message query)
- throws SystemException, RequestException {
+ throws PerfSONARException, PerfSONARException {
if (query == null)
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.query",
"OwampQueryGenerator.getMetadataQuery: "
+ "Input message is null");
@@ -98,7 +91,7 @@
logger.error(
"OwampQueryGenerator.getMetadataQuery: "
+ "Unable to get metadata from the message");
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"OwampQueryGenerator.getMetadataQuery: "
+ "Unable to get metadata from the message; "
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-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/UtilizationQueryGenerator.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -5,20 +5,17 @@
package
org.perfsonar.service.measurementArchive.metadataConfig.queryGenerator;
+import org.ggf.ns.nmwg.base.v2_0.Message;
+import org.ggf.ns.nmwg.base.v2_0.Metadata;
+import org.ggf.ns.nmwg.characteristic.utilization.v2_0.Subject;
+import org.ggf.ns.nmwg.topology.v2_0.Interface;
import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.ComponentNames;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.ggf.ns.nmwg.base.v2_0.Message;
-import org.ggf.ns.nmwg.base.v2_0.Metadata;
-import org.ggf.ns.nmwg.topology.v2_0.Interface;
-import org.ggf.ns.nmwg.characteristic.utilization.v2_0.Subject;
-
-
/**
* Transforms nmwg message into xquery/xpath
* (query to fetch metadata with utilization metric)
@@ -41,7 +38,7 @@
- public UtilizationQueryGenerator() throws SystemException {
+ public UtilizationQueryGenerator() throws PerfSONARException {
try {
@@ -49,9 +46,9 @@
AuxiliaryComponentManager.
getInstance().
getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_logger",
"UtilizationQueryGenerator.constructor: "
+ "Cannot get logger component");
@@ -71,7 +68,7 @@
* stored in Message object.
*/
public String getMetadataQuery(Message query)
- throws SystemException, RequestException {
+ throws PerfSONARException {
//logger.debug("UtilizationQueryGenerator.getMetadataQuery: "
@@ -98,7 +95,7 @@
logger.error(
"UtilizationQueryGenerator.getMetadataQuery: "
+ "Unable to get metadata from the message");
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"UtilizationQueryGenerator.getMetadataQuery: "
+ "Unable to get metadata from the message; "
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/register/LSRegistrationComponent.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/register/LSRegistrationComponent.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/register/LSRegistrationComponent.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -6,7 +6,6 @@
import org.ggf.ns.nmwg.base.v2_0.Message;
-
import org.perfsonar.commons.auxiliary.AuxiliaryComponent;
import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.ComponentNames;
@@ -14,10 +13,7 @@
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
import org.perfsonar.commons.auxiliary.components.simplescheduler.Scheduler;
import
org.perfsonar.commons.auxiliary.components.simplescheduler.SchedulerAction;
-
import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-
import
org.perfsonar.service.commons.registration.GenericServiceLSRegistrator;
import
org.perfsonar.service.commons.registration.InformationXMLFileServiceContent;
import
org.perfsonar.service.commons.registration.PropertiesServiceDescription;
@@ -68,7 +64,7 @@
- public LSRegistrationComponent() throws SystemException {
+ public LSRegistrationComponent() throws PerfSONARException {
try {
@@ -77,9 +73,9 @@
getInstance().
getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_logger",
"LSRegistrationComponent.initComponent: "
+ "Cannot get logger component");
@@ -94,9 +90,9 @@
getInstance().
getComponent(ComponentNames.CONFIG);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_configuration",
"LSRegistrationComponent.initComponent: "
+ "Cannot get config component");
@@ -162,7 +158,7 @@
// ---------------------- component that loads action to scheduler
- public void initComponent() throws SystemException {
+ public void initComponent() throws PerfSONARException {
//Get configuration
@@ -177,7 +173,7 @@
} catch (RuntimeException e) {
//possibly not an integer - keep default interval
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
//no property - keep default interval
}
@@ -204,13 +200,13 @@
getComponent(schedulerVal);
if (scheduler == null)
- throw new SystemException("error.rrdma.no_scheduler",
+ throw new PerfSONARException("error.rrdma.no_scheduler",
"LSRegistrationComponent.initComponent: "
+ "No scheduler component in
AuxiliaryComponentManager");
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException("error.rrdma.no_scheduler",
+ throw new PerfSONARException("error.rrdma.no_scheduler",
"LSRegistrationComponent.initComponent:"
+ "LSCleanupLoader: no [component."
+ componentName + ".scheduler_component] parameter. "
Copied:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/rrdType/BaseChainingMergerFactory.java
(from rev 2406,
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType/BaseChainingMergerFactory.java)
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/rrdType/NMWGInterfaceBaseChaining.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/rrdType/NMWGInterfaceBaseChaining.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/rrdType/NMWGInterfaceBaseChaining.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -27,7 +27,7 @@
import org.perfsonar.commons.messages.BaseChaining;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
@@ -44,7 +44,7 @@
- public NMWGInterfaceBaseChaining() throws SystemException {
+ public NMWGInterfaceBaseChaining() throws PerfSONARException {
super();
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/rrdType/RRDStorageManager.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/rrdType/RRDStorageManager.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/rrdType/RRDStorageManager.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -14,9 +14,7 @@
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.ggf.ns.nmwg.base.v2_0.Message;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
@@ -98,7 +96,7 @@
- public RRDStorageManager() throws SystemException {
+ public RRDStorageManager() throws PerfSONARException {
try {
@@ -108,9 +106,9 @@
getInstance().
getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_logger",
"RRDStorageManager.constructor: "
+ "Cannot get logger component");
@@ -124,9 +122,9 @@
getInstance().
getComponent(ComponentNames.CONFIG);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_configuration",
"RRDStorageManager.constructor: "
+ "Cannot get config component");
@@ -142,7 +140,7 @@
public void initStorage(Key dataRepository)
- throws SystemException {
+ throws PerfSONARException {
//do nothing
@@ -158,14 +156,14 @@
*
* @return Message object containing the data.
*
- * @throws SystemException
+ * @throws PerfSONARException
* @throws RequestException
* @throws DataFormatException
*
* @author romradz
*/
public Message fetch(Message dataQuery)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
Message data = this.rrdFetch(dataQuery);
return data;
@@ -184,14 +182,14 @@
*
* @return Message object containing the request, if the update was
successful
*
- * @throws SystemException
+ * @throws PerfSONARException
* @throws RequestException
* @throws DataFormatException
*
* @author loukik
*/
public Message store(Message dataSet)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
// find out the filename from the given dataSet
@@ -222,7 +220,7 @@
"for storage do not contain a key. Key is necessary to
identify" +
"the file where data should be stored. Cannot continue
with storage");
- throw new SystemException("RRDStorageManager.store: Storage
manager cannot store" +
+ throw new PerfSONARException("RRDStorageManager.store: Storage
manager cannot store" +
"data into any rrd file as no rrd file was specified in
the data store request." +
"Such specifications are present in the key element and
no key element was found");
}
@@ -241,7 +239,7 @@
"for storage do not contain a key. Key is necessary to
identify" +
"the file where data should be stored. Cannot continue
with storage");
- throw new SystemException("RRDStorageManager.store: Storage
manager cannot store" +
+ throw new PerfSONARException("RRDStorageManager.store: Storage
manager cannot store" +
"data into any rrd file as no rrd file was specified in
the data store request." +
"Such specifications are present in the key element and
no key element was found");
@@ -255,7 +253,7 @@
try {
this.createRRDFile(dataSet);
}
- catch (SystemException se) {
+ catch (PerfSONARException se) {
throw se;
}
catch (Exception e) {
@@ -263,7 +261,7 @@
"while creating new file: " + fileName + "
Exception: " +
e.getMessage());
- throw new SystemException("RRDStorageManager.store: Unknown
exception caught " +
+ throw new PerfSONARException("RRDStorageManager.store:
Unknown exception caught " +
"while creating new file " + fileName + " Exception:
" + e.getMessage());
}
@@ -293,17 +291,17 @@
*
* @return Message object containing the data.
*
- * @throws SystemException
+ * @throws PerfSONARException
* @throws RequestException
* @throws DataFormatException
*
* @author romradz
*/
protected Message rrdFetch(Message query)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
if (query == null)
- throw new RequestException(
+ throw new PerfSONARException (
"error.ma.query",
"RRDStorageManager.rrdFetch: Query message is null");
@@ -326,6 +324,11 @@
Parameter dataSource =
key.getParameterByName("dataSource");
Parameter valueUnits =
key.getParameterByName("valueUnits");
+ Parameter dataSourceStep =
key.getParameterByName("dataSourceStep");
+ Parameter dataSourceType =
key.getParameterByName("dataSourceType");
+ Parameter dataSourceHeartbeat =
key.getParameterByName("dataSourceHeartbeat");
+ Parameter dataSourceMinValue =
key.getParameterByName("dataSourceMinValue");
+ Parameter dataSourceMaxValue =
key.getParameterByName("dataSourceMaxValue");
// ---------------
@@ -337,19 +340,24 @@
String _dataSource = null;
String _valueUnits = null;
+ String _dataSourceStep = null;
+ String _dataSourceType = null;
+ String _dataSourceHeartbeat = null;
+ String _dataSourceMinValue = null;
+ String _dataSourceMaxValue = null;
try {
_startTime = TimeDateUtil.getUnixTime(startTime);
- } catch (DataFormatException dfex) {
- throw new DataFormatException(dfex.getResultCode(),
dfex.getMessage());
+ } catch (PerfSONARException dfex) {
+ throw new PerfSONARException(dfex.getResultCode(),
dfex.getMessage());
} catch (Exception ex) {
;
}
try {
_endTime = TimeDateUtil.getUnixTime(endTime);
- } catch (DataFormatException dfex) {
- throw new DataFormatException(dfex.getResultCode(),
dfex.getMessage());
+ } catch (PerfSONARException dfex) {
+ throw new PerfSONARException(dfex.getResultCode(),
dfex.getMessage());
} catch (Exception ex) {
;
}
@@ -417,6 +425,39 @@
}
+ // ---------------
+
+
+ try {
+ _dataSourceStep = dataSourceStep.getParameterValue();
+ } catch (Exception ex) {
+ ;
+ }
+
+ try {
+ _dataSourceType = dataSourceType.getParameterValue();
+ } catch (Exception ex) {
+ ;
+ }
+
+ try {
+ _dataSourceHeartbeat =
dataSourceHeartbeat.getParameterValue();
+ } catch (Exception ex) {
+ ;
+ }
+
+ try {
+ _dataSourceMinValue = dataSourceMinValue.getParameterValue();
+ } catch (Exception ex) {
+ ;
+ }
+
+ try {
+ _dataSourceMaxValue = dataSourceMaxValue.getParameterValue();
+ } catch (Exception ex) {
+ ;
+ }
+
// now we completed all required rrdtool parameters
// and can use them to fetch data from rrd file
@@ -430,6 +471,31 @@
__resolution);
Data data = getRRDColumn(fdata, _dataSource, _valueUnits);
+
+ Parameters parameters = new Parameters();
+
+ if (_dataSourceStep != null)
+ if (!_dataSourceStep.trim().equals(""))
+ parameters.addParameter("dataSourceStep",
_dataSourceStep);
+
+ if (_dataSourceType != null)
+ if (!_dataSourceType.trim().equals(""))
+ parameters.addParameter("dataSourceType",
_dataSourceType);
+
+ if (_dataSourceHeartbeat != null)
+ if (!_dataSourceHeartbeat.trim().equals(""))
+ parameters.addParameter("dataSourceHeartbeat",
_dataSourceHeartbeat);
+
+ if (_dataSourceMinValue != null)
+ if (!_dataSourceMinValue.trim().equals(""))
+ parameters.addParameter("dataSourceMinValue",
_dataSourceMinValue);
+
+ if (_dataSourceMaxValue != null)
+ if (!_dataSourceMaxValue.trim().equals(""))
+ parameters.addParameter("dataSourceMaxValue",
_dataSourceMaxValue);
+
+ data.setChild(parameters);
+
rrdDataSet.setData(data);
} catch (RrdException se) {
@@ -437,7 +503,7 @@
logger.error("RRDStorageManager.rrdFetch: "
+ "Cannot retrieve data from rrdjtool library: "
+ se.getMessage());
- throw new SystemException(
+ throw new PerfSONARException(
"error.rrdma.rrdjtool",
"RRDStorageManager.rrdFetch: "
+ "Cannot retrieve data from rrdjtool library: "
@@ -448,7 +514,7 @@
logger.error("RRDStorageManager.rrdFetch: "
+ "Cannot connect with rrdjtool native library: "
+ ule.getMessage());
- throw new SystemException(
+ throw new PerfSONARException(
"error.rrdma.rrdjtool",
"RRDStorageManager.rrdFetch: "
+ "Cannot connect with rrdjtool native library: "
@@ -538,7 +604,7 @@
* @author mac
*/
private Data getRRDColumn(FetchData data, String dataSource, String
valueUnits)
- throws DataFormatException {
+ throws PerfSONARException {
int rows = data.getRowCount();
int cols = data.getColCount();
@@ -574,7 +640,7 @@
} else {
- throw new DataFormatException(
+ throw new PerfSONARException(
"error.rrdma.rrd_file",
"RRDStorageManager.getRRDColumn: "
+ "No " + dataSource + " column/data source in RRD
file");
@@ -592,11 +658,11 @@
* to create a new file
*
* @return true if file was created
- * @throws SystemException
+ * @throws PerfSONARException
*
* @author loukik
*/
- private boolean createRRDFile(Message request) throws SystemException {
+ private boolean createRRDFile(Message request) throws PerfSONARException
{
Map metadataMap = request.getMetadataMap();
@@ -647,7 +713,7 @@
+ dsTypeDefault);
else {
logger.fatal("RRDStorageManager.createRRDFile: config read a
null property for RRD_DS_Type_Default ?");
- throw new SystemException("RRDStorageManager: createRRDFile:
System configuration error. " +
+ throw new PerfSONARException("RRDStorageManager: createRRDFile:
System configuration error. " +
"Creating a new rrd file requires reading ds
default type from config file. " +
"This information is missing");
}
@@ -683,7 +749,7 @@
logger.fatal("RRDStorageManager.createRRDFile: could not create
rrd file " +
"because filename information could not be found in
request");
- throw new SystemException("RRDStorageManager.createRRDFile:
could not create rrd file " +
+ throw new PerfSONARException("RRDStorageManager.createRRDFile:
could not create rrd file " +
"because filename information could not be found in
request");
}
@@ -700,7 +766,7 @@
logger.fatal("RRDStorageManager.createRRDFile: could not create
rrd file " +
"because 'step' parameter information is missing");
- throw new SystemException("RRDStorageManager.createRRDFile:
could not create rrd file " +
+ throw new PerfSONARException("RRDStorageManager.createRRDFile:
could not create rrd file " +
"because 'step' parameter information is
missing");
}
@@ -712,7 +778,7 @@
logger.fatal("RRDStorageManager.createRRDFile: could not create
rrd file " +
"because 'data source' information is missing");
- throw new SystemException("RRDStorageManager.createRRDFile:
could not create rrd file " +
+ throw new PerfSONARException("RRDStorageManager.createRRDFile:
could not create rrd file " +
"because 'data source' information is
missing");
}
@@ -732,7 +798,7 @@
logger.fatal("RRDStorageManager.createRRDFile: could not create
rrd file " +
"because 'RRA (Round Robin Archive)' information is
missing");
- throw new SystemException("RRDStorageManager.createRRDFile:
could not create rrd file " +
+ throw new PerfSONARException("RRDStorageManager.createRRDFile:
could not create rrd file " +
"because 'RRA (Round Robin Archive)'
information is missing");
}
@@ -760,7 +826,7 @@
logger.fatal("RRDStorageManager.createRRDFile: command given
was: " + command);
- throw new SystemException("RRDStorageManager.createRRDFile: " +
+ throw new PerfSONARException("RRDStorageManager.createRRDFile: "
+
"RRDTool could not create RRD file with the
configured parameters " +
"and filename: " + fileName + ".
RrdException was encountered." +
" Message:" + e.getMessage());
@@ -775,7 +841,7 @@
logger.fatal("RRDStorageManager.createRRDFile: command given
was: " + command);
- throw new SystemException("RRDStorageManager.createRRDFile:
Error encountered " +
+ throw new PerfSONARException("RRDStorageManager.createRRDFile:
Error encountered " +
"while creating rrd file for the given
filename:"+fileName+" and" +
"configured parameters. Message:
"+e.getMessage());
@@ -795,7 +861,7 @@
logger.fatal("RRDStorageManager.createRRDFile: Unknown error
occurred while " +
"creating rrd file");
- throw new SystemException("RRDStorageManager.createRRDFile: " +
+ throw new PerfSONARException("RRDStorageManager.createRRDFile: "
+
"Unknown error occurred while creating
rrd file. " +
"Request could not be completed");
@@ -812,7 +878,7 @@
*
* @author loukik
*/
- private boolean updateRRDFile(Message request) throws SystemException {
+ private boolean updateRRDFile(Message request) throws PerfSONARException
{
String fileName = "";
String dataSource = "";
@@ -1047,7 +1113,7 @@
logger.fatal("RRDStorageManager.updateRRDFile: could not update
rrd file " +
"because filename information could not be found in
request");
- throw new SystemException("RRDStorageManager.updateRRDFile:
could not update rrd file " +
+ throw new PerfSONARException("RRDStorageManager.updateRRDFile:
could not update rrd file " +
"because filename information could not
be found in request");
}
@@ -1069,7 +1135,7 @@
logger.fatal("RRDStorageManager.updateRRDFile: could not update
rrd file " +
"because data-source information could not be found in
request");
- throw new SystemException("RRDStorageManager.updateRRDFile:
could not update rrd file " +
+ throw new PerfSONARException("RRDStorageManager.updateRRDFile:
could not update rrd file " +
"because data-source information could
not be found in request");
}
@@ -1102,7 +1168,7 @@
" and datasource: " + dataSource + " with the given
data." +
" Message: " + e.getMessage());
- throw new SystemException("RRDStorageManager.createRRDFile:" +
+ throw new PerfSONARException("RRDStorageManager.createRRDFile:" +
" could not update rrd file: " + fileName + " " +
" and datasource: " + dataSource +" with the given.
RrdException " +
" was encountered. Message: " + e.getMessage());
@@ -1115,7 +1181,7 @@
" and datasource: " + dataSource + " with the given
data."+
" Message: " + e.getMessage());
- throw new SystemException("RRDStorageManager.createRRDFile:" +
+ throw new PerfSONARException("RRDStorageManager.createRRDFile:" +
" could not update rrd file: " + fileName+
" and datasource: " + dataSource + " with the given.
Unknown Exception" +
" was encountered. Message: " + e.getMessage());
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-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/rrdType/RRDTypeMAServiceEngine.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -6,41 +6,31 @@
import java.util.Collection;
+import java.util.Date;
+import java.util.Iterator;
import java.util.Map;
-import java.util.HashMap;
+import java.util.Random;
+import java.util.Set;
import java.util.Vector;
-import java.util.Random;
-import java.util.Date;
+import org.ggf.ns.nmwg.base.v2_0.Data;
+import org.ggf.ns.nmwg.base.v2_0.Key;
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.Data;
-import org.ggf.ns.nmwg.base.v2_0.Datum;
-import org.ggf.ns.nmwg.base.v2_0.Key;
+import org.ggf.ns.nmwg.base.v2_0.Parameter;
import org.ggf.ns.nmwg.base.v2_0.Parameters;
-import org.ggf.ns.nmwg.base.v2_0.Parameter;
-
-import org.perfsonar.service.commons.storage.NMWGStorageManager;
-import
org.perfsonar.service.measurementArchive.metadataConfig.MetadataConfigurationStorageManager;
-import
org.perfsonar.service.measurementArchive.metadataConfig.SimpleMetadataConfigurationStorageManager;
-
-import org.perfsonar.commons.auxiliary.AuxiliaryComponent;
import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.ComponentNames;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-
+import org.perfsonar.commons.messages.BaseChaining;
import org.perfsonar.service.commons.engine.ActionType;
import org.perfsonar.service.commons.engine.ServiceEngine;
-
-import org.perfsonar.commons.messages.BaseChaining;
-
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
import org.perfsonar.service.commons.exceptions.PerfSONARException;
-
+import org.perfsonar.service.commons.storage.NMWGStorageManager;
import org.perfsonar.service.commons.util.ResultCodesUtil;
+import
org.perfsonar.service.measurementArchive.metadataConfig.MetadataConfigurationStorageManager;
+import
org.perfsonar.service.measurementArchive.metadataConfig.SimpleMetadataConfigurationStorageManager;
/**
@@ -95,9 +85,9 @@
/**
* Construction for the service engine
- * @throws SystemException
+ * @throws PerfSONARException
*/
- public RRDTypeMAServiceEngine() throws SystemException {
+ public RRDTypeMAServiceEngine() throws PerfSONARException {
this.serviceEngineType = "service.MeasurementArchive.RRDType";
@@ -109,9 +99,9 @@
getInstance().
getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_logger",
"RRDTypeMAServiceEngine.constructor: "
+ "Cannot get logger component");
@@ -125,9 +115,9 @@
getInstance().
getComponent(ComponentNames.CONFIG);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_configuration",
"RRDTypeMAServiceEngine.constructor: "
+ "Cannot get config component");
@@ -182,14 +172,14 @@
* @param Message object containing the request
* @return Message object containing the response
*
- * @throws SystemException
+ * @throws PerfSONARException
* @throws RequestException
* @throws DataFormatException
*
* @see org.perfsonar.service.commons.engine.ServiceEngine
*/
public Message takeAction(String actionType, Message request)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
logger.debug("RRDTypeMAServiceEngine.takeAction: "
+ "Received a request of type - "
@@ -254,7 +244,7 @@
"RRDTypeMAServiceEngine.takeAction: ActionType specified: "
+ actionType + " is not supported");
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.action",
"RRDTypeMAServiceEngine: "
+ "ActionType specified: "
@@ -303,12 +293,12 @@
* @param Message object containing the request
* @return Message object containing the response with a key
*
- * @throws SystemException
+ * @throws PerfSONARException
* @throws RequestException
* @throws DataFormatException
*/
protected Message getKey(Message request)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
// process the base chaining
request = messageProcess(request);
@@ -331,7 +321,7 @@
} catch (NullPointerException npex) {
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"RRDTypeMAServiceEngine.getKey: "
+ "getting the key is impossible "
@@ -366,24 +356,36 @@
* @param Message object to be processed
* @return Message processed message object
*
- * @throws SystemException
+ * @throws PerfSONARException
*/
protected Message messageProcess(Message message)
- throws SystemException {
+ throws PerfSONARException {
- // --- remove of base chainig
+ Set baseChainingMergers =
+ BaseChainingMergerFactory.getBaseChainingMergers();
- BaseChaining baseChaining = new NMWGInterfaceBaseChaining();
- message = baseChaining.processChaining(message);
- return message;
+ if (baseChainingMergers == null)
+ return message;
+ BaseChaining baseChaining = null;
+
+ Iterator iterator = baseChainingMergers.iterator();
+ while (iterator.hasNext()) {
+
+ baseChaining = (BaseChaining) iterator.next();
+ message = baseChaining.processChaining(message);
+
+ }
+
+ return message;
+
}
/**
* Method used in getKey method. Helps to find a key for a request
message.
*
- * @throws SystemException
+ * @throws PerfSONARException
* @throws RequestException
* @throws DataFormatException
*/
@@ -392,7 +394,7 @@
Map metadataMap,
Message message,
NMWGStorageManager metadataConfig)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
if (metadata.getSubject() != null ) {
@@ -509,12 +511,12 @@
* @param Message object containing the request
* @return Message object containing the response with measurement data
*
- * @throws SystemException
+ * @throws PerfSONARException
* @throws RequestException
* @throws DataFormatException
*/
protected Message getData(Message request)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
Message response = new Message();
@@ -568,19 +570,19 @@
* is switched on in the service
* @return Message object containing the response
*
- * @throws SystemException
+ * @throws PerfSONARException
* @throws RequestException
* @throws DataFormatException
*/
protected Message storeData(Message request, boolean status)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
Message response = new Message();
if (status == false) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.rrd.writing",
"RRDTypeMAServiceEngine.storeData: "
+ "Writing data or xmldb is switched off in the MA "
@@ -606,7 +608,7 @@
} catch (NullPointerException npex) {
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"RRDTypeMAServiceEngine.storeData: "
+ "getting the store key is impossible "
@@ -645,12 +647,12 @@
/**
* Returns a key for the request with data to be stored in MA.
*
- * @throws SystemException
+ * @throws PerfSONARException
* @throws RequestException
* @throws DataFormatException
*/
protected Key getStoreKey(Metadata metadata)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
Key key = metadata.getKey();
@@ -662,13 +664,13 @@
Parameter dataSource = key.getParameterByName("dataSource");
if (file == null)
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.rrdrrd_file",
"RRDTypeMAServiceEngine.getStoreKey: "
+ "No parameter in the key representing rrd file
name");
if (dataSource == null)
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.rrdrrd_file",
"RRDTypeMAServiceEngine.getStoreKey: "
+ "No parameter in the key representing data source "
@@ -684,23 +686,13 @@
Message resp = null;
try {
resp = metadataConfig.fetch(query);
- } catch (SystemException sex) {
+ } catch (PerfSONARException sex) {
if
(sex.getResultCode().equals("warning.ma.metadata_configuration"))
resp = new Message();
else
- throw new SystemException(
- sex.getResultCode(),
- sex.getResultDescription());
- } catch (RequestException rex) {
- throw new RequestException(
- rex.getResultCode(),
- rex.getResultDescription());
- } catch (DataFormatException dfex) {
- throw new DataFormatException(
- dfex.getResultCode(),
- dfex.getResultDescription());
+ throw sex;
} catch (Exception ex) {
- throw new SystemException(
+ throw new PerfSONARException(
"uknown",
"RRDTypeMAServiceEngine.getStoreKey: "
+ "Something wrong has happened during fetching data
"
@@ -727,13 +719,19 @@
if (dir == null)
dir = "";
- Parameter f = null;
- Parameter ds = null;
+ Parameter f = null;
+ Parameter ds = null;
+ Parameter dss = null;
+ Parameter dst = null;
+ Parameter dsh = null;
+ Parameter dsminv = null;
+ Parameter dsmaxv = null;
// getting parameters from metadata
Parameters ps = metadata.getParameters();
if (ps != null) {
+ // checking file name parameter
Parameter _f = ps.getParameterByName("file");
if (_f != null) {
f = new Parameter();
@@ -741,13 +739,30 @@
f.setParameterValue(dir + _f.getParameterValue());
}
+ //checking data source parameter
Parameter _ds = ps.getParameterByName("dataSource");
- if (_ds != null) {
- ds = new Parameter();
- ds.setParameterName("dataSource");
- ds.setParameterValue(_ds.getParameterValue());
- }
+ if (_ds != null) ds = _ds;
+ //checking rrd source step parameter
+ Parameter _dss = ps.getParameterByName("dataSourceStep");
+ if (_dss != null) dss = _dss;
+
+ //checking rrd source type parameter
+ Parameter _dst = ps.getParameterByName("dataSourceType");
+ if (_dst != null) dst = _dst;
+
+ //checking rrd source heartbeat parameter
+ Parameter _dsh =
ps.getParameterByName("dataSourceHeartbeat");
+ if (_dsh != null) dsh = _dsh;
+
+ //checking rrd source min value parameter
+ Parameter _dsminv =
ps.getParameterByName("dataSourceMinValue");
+ if (_dsminv != null) dsminv = _dsminv;
+
+ //checking rrd source max value parameter
+ Parameter _dsmaxv =
ps.getParameterByName("dataSourceMaxValue");
+ if (_dsmaxv != null) dsmaxv = _dsmaxv;
+
}
@@ -766,10 +781,7 @@
if (metadata.getEventType() != null) {
- if (metadata.getEventType().getEventType().trim() !=
"")
-
ds.setParameterValue(metadata.getEventType().getEventType().trim());
- else
- ds.setParameterValue("ds");
+ ds.setParameterValue("ds");
Parameters params = new Parameters();
params.addParameter(
@@ -791,6 +803,12 @@
params.addChild(f);
params.addChild(ds);
+ if (dss != null) params.addChild(dss);
+ if (dst != null) params.addChild(dst);
+ if (dsh != null) params.addChild(dsh);
+ if (dsminv != null) params.addChild(dsminv);
+ if (dsmaxv != null) params.addChild(dsmaxv);
+
key = k;
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/SQLStorageManager.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/SQLStorageManager.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/SQLStorageManager.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -34,10 +34,8 @@
import org.ggf.ns.nmwg.base.v2_0.Parameter;
import org.ggf.ns.nmwg.base.v2_0.Parameters;
+
import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
import
org.perfsonar.service.measurementArchive.sqlType.fetch.ResponseGenerator;
import
org.perfsonar.service.measurementArchive.sqlType.fetch.ResponseGeneratorFactory;
@@ -66,7 +64,7 @@
- public SQLStorageManager() throws SystemException {
+ public SQLStorageManager() throws PerfSONARException {
try {
@@ -75,9 +73,9 @@
getInstance().
getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_logger",
"SQLStorageManager.constructor: "
+ "Cannot get logger component");
@@ -93,7 +91,7 @@
public void initStorage(Key dataRepository)
- throws SystemException {
+ throws PerfSONARException {
//do nothing
@@ -101,11 +99,11 @@
public Message fetch(Message dataQuery)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
if (dataQuery == null)
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"SQLStorageManager.fetch: "
+ "Query message is null");
@@ -139,7 +137,7 @@
try {
startTime = Long.parseLong(pvalue);
} catch (NumberFormatException nfex) {
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"SQLStorageManager.fetch: "
+ "startTime parameter in the request "
@@ -153,7 +151,7 @@
try {
endTime = Long.parseLong(pvalue);
} catch (NumberFormatException nfex) {
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"SQLStorageManager.fetch: "
+ "endTime parameter in the request "
@@ -189,7 +187,7 @@
resultList = sqlMap.queryForList("getResults2",
ibatisParams);
} else {
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"SQLStorageManager.fetch: "
+ "Uknown value of time parameter in the
request");
@@ -217,7 +215,7 @@
logger.error("SQLStorageManager.fetch: Unable to fetch data:
"
+ ioex.toString());
- throw new RequestException(
+ throw new PerfSONARException(
"error.sqlma.db_connection",
"SQLStorageManager.fetch: Unable to fetch data"
);
@@ -235,10 +233,10 @@
public Message store(Message dataSet)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
if (dataSet == null)
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"SQLStorageManager.store: Input request is null");
@@ -267,13 +265,13 @@
String ibatisConfig = (String) ibatisParams.get("ibatisConfig");
if (ibatisConfig == null)
- throw new RequestException(
+ throw new PerfSONARException(
"error.sqlma.db_connection.ibatis",
"SQLStorageManager.store: "
+ "No ibatisConfig parameter in the key");
if (ibatisConfig.trim() == "")
- throw new RequestException(
+ throw new PerfSONARException(
"error.sqlma.db_connection.ibatis",
"SQLStorageManager.store: "
+ "Empty ibatisConfig parameter in the key");
@@ -297,7 +295,7 @@
} catch (Exception ioex) {
- throw new RequestException(
+ throw new PerfSONARException(
"error.sqlma.db_connection",
"SQLStorageManager.store: Problem generated by
ibatis: "
+ ioex.toString());
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-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/SQLTypeMAServiceEngine.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -6,25 +6,20 @@
import java.util.Collection;
+import java.util.Date;
import java.util.Map;
import java.util.Random;
-import java.util.Date;
-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.EventType;
import org.ggf.ns.nmwg.base.v2_0.Key;
-import org.ggf.ns.nmwg.base.v2_0.Parameters;
+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.Parameter;
-
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-
-import
org.perfsonar.service.measurementArchive.rrdType.RRDTypeMAServiceEngine;
+import org.ggf.ns.nmwg.base.v2_0.Parameters;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import
org.perfsonar.service.measurementArchive.metadataConfig.MetadataConfigurationStorageManager;
+import
org.perfsonar.service.measurementArchive.rrdType.RRDTypeMAServiceEngine;
/**
* Class implementing the Measurement Archive Service Engine which deals
with
@@ -44,7 +39,7 @@
- public SQLTypeMAServiceEngine() throws SystemException {
+ public SQLTypeMAServiceEngine() throws PerfSONARException {
super();
serviceEngineType = "service.MeasurementArchive.SQLType";
@@ -61,7 +56,7 @@
public Message takeAction(String actionType, Message request)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
Message response = super.takeAction(actionType, request);
@@ -76,7 +71,7 @@
protected Message getKey(Message request)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
Message keyMessage = super.getKey(request);
return keyMessage;
@@ -85,7 +80,7 @@
protected Message getData(Message request)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
Message response = new Message();
@@ -142,7 +137,7 @@
protected Message storeData(Message request, boolean status)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
//logger.debug("SQLTypeMAServiceEngine.storeData: start method");
@@ -152,7 +147,7 @@
if (status == false) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.writing",
"SQLTypeMAServiceEngine.storeData: "
+ "Writing data is switched off in the MA "
@@ -195,7 +190,7 @@
protected Key getStoreKey(Metadata metadata)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
Key key = metadata.getKey();
@@ -207,14 +202,14 @@
Parameter ibatisConfig = key.getParameterByName("ibatisConfig");
if (ibatisConfig == null)
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"SQLTypeMAServiceEngine.getStoreKey: "
+ "No ibatisConfig parameter in the key");
Parameter eventType = key.getParameterByName("eventType");
if (eventType == null)
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"SQLTypeMAServiceEngine.getStoreKey: "
+ "No eventType parameter in the key");
@@ -225,13 +220,13 @@
EventType eventTypeObj = metadata.getEventType();
if (eventTypeObj == null)
- throw new RequestException("error.ma.query",
+ throw new PerfSONARException("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",
+ throw new PerfSONARException("error.ma.query",
"SQLTypeMAServiceEngine.getStoreKey: "
+ "eventType in the request metadata is empty");
@@ -241,11 +236,11 @@
try{
resp = metadataConfig.fetch(query);
- } catch (SystemException sex) {
+ } catch (PerfSONARException sex) {
if
(sex.getResultCode().equals("warning.ma.metadata_configuration"))
resp = new Message();
else
- throw new SystemException(
+ throw new PerfSONARException(
sex.getResultCode(),
sex.getResultDescription());
}
@@ -303,7 +298,7 @@
if (params.getParameterByName("ibatisConfig") == null) {
logger.error("SQLTypeMAServiceEngine.getStoreKey: "
+ "No default ibatis property in the key");
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.sql.db_connection.ibatis",
"SQLTypeMAServiceEngine.getStoreKey: "
+ "No default ibatis property "
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-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/fetch/L2PathStatusResponseGenerator.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -6,19 +6,17 @@
import java.util.Collection;
+import java.util.Date;
import java.util.List;
import java.util.Map;
-import java.util.Date;
-import org.xml.sax.helpers.NamespaceSupport;
-
import org.ggf.ns.nmwg.base.v2_0.Data;
import org.ggf.ns.nmwg.event.status.base.v2_0.Datum;
-import org.ggf.ns.nmwg.event.status.base.v2_0.StateOper;
import org.ggf.ns.nmwg.event.status.base.v2_0.StateAdmin;
+import org.ggf.ns.nmwg.event.status.base.v2_0.StateOper;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
+import org.xml.sax.helpers.NamespaceSupport;
-import org.perfsonar.service.commons.exceptions.SystemException;
-
/**
* Creates the response of service for L2 path status metric.
*
@@ -32,7 +30,7 @@
- public L2PathStatusResponseGenerator() throws SystemException {
+ public L2PathStatusResponseGenerator() throws PerfSONARException {
super();
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/fetch/OwampResponseGenerator.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/fetch/OwampResponseGenerator.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/fetch/OwampResponseGenerator.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -9,12 +9,8 @@
import org.ggf.ns.nmwg.base.v2_0.Data;
import org.ggf.ns.nmwg.tools.owamp.v2_0.Datum;
-import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
-import org.perfsonar.commons.auxiliary.ComponentNames;
-import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-
/**
* Creates the response of service for owamp data.
*
@@ -29,7 +25,7 @@
- public OwampResponseGenerator() throws SystemException {
+ public OwampResponseGenerator() throws PerfSONARException {
super();
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/fetch/ResponseGenerator.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/fetch/ResponseGenerator.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/fetch/ResponseGenerator.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -13,7 +13,7 @@
import org.perfsonar.commons.auxiliary.ComponentNames;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* Creates the response of service.
@@ -36,7 +36,7 @@
- public ResponseGenerator() throws SystemException {
+ public ResponseGenerator() throws PerfSONARException {
try {
@@ -45,9 +45,9 @@
getInstance().
getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_logger",
"ResponseGenerator.constructor: "
+ "Cannot get logger component");
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/fetch/ResponseGeneratorFactory.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/fetch/ResponseGeneratorFactory.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/fetch/ResponseGeneratorFactory.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -10,7 +10,7 @@
import org.perfsonar.commons.auxiliary.ComponentNames;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.measurementArchive.eventTypeConfig.EventType;
import
org.perfsonar.service.measurementArchive.eventTypeConfig.EventTypeConfigurationComponent;
@@ -27,7 +27,7 @@
public static ResponseGenerator getResponseGenerator(String
eventTypeName)
- throws SystemException {
+ throws PerfSONARException {
LoggerComponent logger = (LoggerComponent)
@@ -46,7 +46,7 @@
eventTypeConfigurationComponent.getEventType(eventTypeName);
if (eventType == null)
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.query",
"ResponseGeneratorFactory.getResponseGenerator: "
+ "eventType " + eventTypeName + " is not supported");
@@ -60,7 +60,7 @@
// + className);
if (className == null || className.trim().equals(""))
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.metadata_query_mapping_configuration",
"ResponseGeneratorFactory.getResponseGenerator: "
+ "Could not find class name for eventType "
@@ -82,7 +82,7 @@
+ "Unable to create an object of : "
+ className + ": "
+ ex.toString());
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.metadata_query_mapping_configuration",
"ResponseGeneratorFactory.getResponseGenerator: "
+ "Unable to create an object of "
@@ -97,7 +97,7 @@
"ResponseGeneratorFactory.getResponseGenerator: "
+ "Could not create a responseGenerator object for "
+ "eventType: " + eventTypeName);
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.metadata_query_mapping_configuration",
"ResponseGeneratorFactory.getResponseGenerator: "
+ "Could not create a responseGenerator for "
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/fetch/UtilizationResponseGenerator.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/fetch/UtilizationResponseGenerator.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/fetch/UtilizationResponseGenerator.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -13,7 +13,7 @@
import org.ggf.ns.nmwg.base.v2_0.Data;
import org.ggf.ns.nmwg.base.v2_0.Datum;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* Creates the response of service for utilization metric.
@@ -28,7 +28,7 @@
- public UtilizationResponseGenerator() throws SystemException {
+ public UtilizationResponseGenerator() throws PerfSONARException {
super();
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/store/L2PathStatusStoreRequestProcess.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/store/L2PathStatusStoreRequestProcess.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/store/L2PathStatusStoreRequestProcess.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -10,7 +10,7 @@
import org.ggf.ns.nmwg.base.v2_0.Element;
import org.ggf.ns.nmwg.event.status.base.v2_0.Datum;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* Moves data from nmwg data element into ibatis map structure
@@ -25,7 +25,7 @@
- public L2PathStatusStoreRequestProcess() throws SystemException {
+ public L2PathStatusStoreRequestProcess() throws PerfSONARException {
super();
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/store/OwampStoreRequestProcess.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/store/OwampStoreRequestProcess.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/store/OwampStoreRequestProcess.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -10,7 +10,7 @@
import org.ggf.ns.nmwg.base.v2_0.Element;
import org.ggf.ns.nmwg.tools.owamp.v2_0.Datum;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* Moves data from nmwg data element into ibatis map structure
@@ -25,7 +25,7 @@
- public OwampStoreRequestProcess() throws SystemException {
+ public OwampStoreRequestProcess() throws PerfSONARException {
super();
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/store/StoreRequestProcess.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/store/StoreRequestProcess.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/store/StoreRequestProcess.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -17,7 +17,7 @@
import org.perfsonar.commons.auxiliary.ComponentNames;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* Abstract class for moving data from Data element into ibatis map
structure.
@@ -40,7 +40,7 @@
- public StoreRequestProcess() throws SystemException {
+ public StoreRequestProcess() throws PerfSONARException {
try {
@@ -49,9 +49,9 @@
getInstance().
getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_logger",
"UtilizationStoreRequestProcess.constructor: "
+ "Cannot get logger component");
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/store/StoreRequestProcessFactory.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/store/StoreRequestProcessFactory.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/store/StoreRequestProcessFactory.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -10,7 +10,7 @@
import org.perfsonar.commons.auxiliary.ComponentNames;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.measurementArchive.eventTypeConfig.EventType;
import
org.perfsonar.service.measurementArchive.eventTypeConfig.EventTypeConfigurationComponent;
@@ -26,7 +26,7 @@
public static StoreRequestProcess getStoreRequestProcess(String
eventTypeName)
- throws SystemException {
+ throws PerfSONARException {
LoggerComponent logger = (LoggerComponent)
@@ -45,7 +45,7 @@
eventTypeConfigurationComponent.getEventType(eventTypeName);
if (eventType == null)
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.query",
"StoreRequestProcessFactory.getStoreRequestProcess: "
+ "eventType " + eventTypeName + " is not supported");
@@ -59,7 +59,7 @@
+ className);
if (className == null || className.trim().equals(""))
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.metadata_query_mapping_configuration",
"StoreRequestProcessFactory.getStoreRequestProcess: "
+ "Could not find class name for eventType "
@@ -81,7 +81,7 @@
+ "Unable to create an object of : "
+ className + ": "
+ ex.toString());
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.metadata_query_mapping_configuration",
"StoreRequestProcessFactory.getResponseGenerator: "
+ "Unable to create an object of "
@@ -96,7 +96,7 @@
"StoreRequestProcessFactory.getResponseGenerator: "
+ "Could not create a responseGenerator object for "
+ "eventType: " + eventTypeName);
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.metadata_query_mapping_configuration",
"StoreRequestProcessFactory.getResponseGenerator: "
+ "Could not create a responseGenerator for "
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/store/UtilizationStoreRequestProcess.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/store/UtilizationStoreRequestProcess.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/store/UtilizationStoreRequestProcess.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -10,7 +10,7 @@
import org.ggf.ns.nmwg.base.v2_0.Element;
import org.ggf.ns.nmwg.base.v2_0.Datum;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* Moves data from nmwg data element into ibatis map structure
@@ -25,7 +25,7 @@
- public UtilizationStoreRequestProcess() throws SystemException {
+ public UtilizationStoreRequestProcess() throws PerfSONARException {
super();
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/testHarness/RRDStorageManagerTester.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/testHarness/RRDStorageManagerTester.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/testHarness/RRDStorageManagerTester.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -5,7 +5,7 @@
package org.perfsonar.service.testHarness;
-import org.perfsonar.service.commons.exceptions.RequestException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.storage.NMWGStorageManager;
import org.perfsonar.service.measurementArchive.rrdType.RRDStorageManager;
@@ -14,7 +14,6 @@
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;
-import org.ggf.ns.nmwg.base.v2_0.Parameter;
import java.util.Collection;
import java.util.Iterator;
@@ -68,7 +67,9 @@
System.err.println("RRDStorageManagerTester.test: "
+ "Fetch and Store are the only possible options
"
+ "for test type."
- + "parameter value: " + testType + " has no
associated action");
+ + "parameter value: "
+ + testType
+ + " has no associated action");
}
@@ -80,15 +81,18 @@
- protected void fetch(Map params, NMWGStorageManager storageManager)
throws Exception {
+ protected void fetch(Map params, NMWGStorageManager storageManager)
+ throws Exception {
String file = (String) params.get("file");
if (file.equals(""))
- System.err.println("RRDStorageManagerTester.test: file parameter
is wrong");
+ System.err.println(
+ "RRDStorageManagerTester.test: file parameter is
wrong");
String dataSource = (String) params.get("dataSource");
if (dataSource.equals(""))
- System.err.println("RRDStorageManagerTester.test: dataSource
parameter is wrong");
+ System.err.println(
+ "RRDStorageManagerTester.test: dataSource parameter
is wrong");
String startTime = (String) params.get("startTime");
try {
@@ -157,11 +161,13 @@
String file = (String) params.get("file");
if (file.equals(""))
- System.err.println("RRDStorageManagerTester.test: file parameter
is wrong");
+ System.err.println(
+ "RRDStorageManagerTester.test: file parameter is
wrong");
String dataSource = (String) params.get("dataSource");
if (dataSource.equals(""))
- System.err.println("RRDStorageManagerTester.test: dataSource
parameter is wrong");
+ System.err.println(
+ "RRDStorageManagerTester.test: dataSource parameter
is wrong");
String startTime = (String) params.get("startTime");
try {
@@ -189,9 +195,9 @@
String values = (String) params.get("values");
String[] valuePair = values.split(",");
- if(valuePair.length<2) {
+ if(valuePair.length < 2) {
- throw new RequestException("RRDStorageManagerTester: Missing " +
+ throw new PerfSONARException("RRDStorageManagerTester: Missing "
+
"Parameters in request. Values should contain a " +
"comma separated pair of numbers, the first is for time"
+
"the second is for data value");
@@ -248,7 +254,8 @@
int len = d.getDatumLength();
for (int i = 0; i < len; i++) {
Datum datum = d.getDatum(i);
- System.out.println("Time: " + datum.getTimeValue() + ",
Value: " + datum.getValue());
+ System.out.println("Time: " + datum.getTimeValue()
+ + ", Value: " + datum.getValue());
}
System.out.println("--------");
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/web/RequestHandler.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/web/RequestHandler.java
2007-05-21 14:47:44 UTC (rev 2407)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/web/RequestHandler.java
2007-05-21 14:50:25 UTC (rev 2408)
@@ -16,7 +16,6 @@
import org.perfsonar.commons.messages.MessageHandlerFactory;
import org.perfsonar.commons.util.XMLUtils;
import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.SystemException;
import org.perfsonar.service.commons.util.ResultCodesUtil;
import org.w3c.dom.Document;
@@ -181,7 +180,7 @@
logger.error("RequestHandler: " +
"Message object constructed as null from request");
- throw new SystemException("error.common.parse_error",
+ throw new PerfSONARException("error.common.parse_error",
"RequestHandler: " +
"Server could not construct a message object " +
"from the request due to unknown error. " +
- perfsonar: r2408 - in branches/JAVA-RRD-MA-STABLE: ant/rrdma conf doc/ma/rrdTypeMA schema/example-instances/perfSONAR src/org/perfsonar/client/commons/requests src/org/perfsonar/client/commons/requests/lookupService src/org/perfsonar/commons/auxiliary src/org/perfsonar/commons/auxiliary/components/configuration src/org/perfsonar/commons/auxiliary/components/configuration/properties src/org/perfsonar/commons/auxiliary/components/mapping src/org/perfsonar/commons/auxiliary/components/scheduler src/org/perfsonar/commons/auxiliary/components/scheduler/actions src/org/perfsonar/commons/auxiliary/components/simplescheduler src/org/perfsonar/commons/container/listeners src/org/perfsonar/commons/messages src/org/perfsonar/commons/util src/org/perfsonar/service/commons/authn src/org/perfsonar/service/commons/authn/tokens src/org/perfsonar/service/commons/engine src/org/perfsonar/service/commons/exceptions src/org/perfsonar/service/commons/measurementExecutor src/org/perfsonar /service/commons/registration src/org/perfsonar/service/commons/storage src/org/perfsonar/service/commons/storage/xmldb src/org/perfsonar/service/commons/storage/xmldb/exist src/org/perfsonar/service/commons/storage/xmldb/exist/rest src/org/perfsonar/service/commons/storage/xmldb/exist/xmlrpc src/org/perfsonar/service/commons/storage/xmlfile src/org/perfsonar/service/measurementArchive/eventTypeConfig src/org/perfsonar/service/measurementArchive/metadataConfig src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator src/org/perfsonar/service/measurementArchive/register src/org/perfsonar/service/measurementArchive/rrdType src/org/perfsonar/service/measurementArchive/sqlType src/org/perfsonar/service/measurementArchive/sqlType/fetch src/org/perfsonar/service/measurementArchive/sqlType/store src/org/perfsonar/service/testHarness src/org/perfsonar/service/web, svnlog, 05/21/2007
Archive powered by MHonArc 2.6.16.