perfsonar-dev - r1597 - in trunk/perfsonar: ant/rrdma ant/sqlma conf src/org/perfsonar/commons/messages src/org/perfsonar/service/commons/engine src/org/perfsonar/service/measurementArchive/rrdType
Subject: perfsonar development work
List archive
r1597 - in trunk/perfsonar: ant/rrdma ant/sqlma conf src/org/perfsonar/commons/messages src/org/perfsonar/service/commons/engine src/org/perfsonar/service/measurementArchive/rrdType
Chronological Thread
- From:
- To:
- Subject: r1597 - in trunk/perfsonar: ant/rrdma ant/sqlma conf src/org/perfsonar/commons/messages src/org/perfsonar/service/commons/engine src/org/perfsonar/service/measurementArchive/rrdType
- Date: Tue, 5 Sep 2006 07:35:09 -0400
Author: roman
Date: 2006-09-05 07:35:08 -0400 (Tue, 05 Sep 2006)
New Revision: 1597
Added:
trunk/perfsonar/src/org/perfsonar/commons/messages/EchoRequest.java
Modified:
trunk/perfsonar/ant/rrdma/rrdma-client-run-targets.xml
trunk/perfsonar/ant/rrdma/rrdma-configure-targets.xml
trunk/perfsonar/ant/sqlma/sqlma-client-run-targets.xml
trunk/perfsonar/ant/sqlma/sqlma-configure-targets.xml
trunk/perfsonar/conf/service.properties.rrdma
trunk/perfsonar/conf/service.properties.sqlma
trunk/perfsonar/src/org/perfsonar/service/commons/engine/ActionType.java
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType/RRDTypeMAServiceEngine.java
Log:
New request of type EchoRequest can be accepted by (RRD and SQL) MA service.
This new type is introduced to ping pS services.
Modified: trunk/perfsonar/ant/rrdma/rrdma-client-run-targets.xml
===================================================================
--- trunk/perfsonar/ant/rrdma/rrdma-client-run-targets.xml 2006-09-05
10:10:41 UTC (rev 1596)
+++ trunk/perfsonar/ant/rrdma/rrdma-client-run-targets.xml 2006-09-05
11:35:08 UTC (rev 1597)
@@ -62,7 +62,17 @@
+ <target name="run-echo">
+ <java classname="org.perfsonar.client.testHarness.SOAPClient"
+ classpathref="classpath" fork="true">
+ <arg value="${ma.local}"/>
+ <arg
value="${basedir}/schema/example-instances/sonar/Echo-Req.xml"/>
+ <arg
value="${basedir}/schema/example-instances/sonar/response.xml"/>
+ </java>
+ </target>
+
+
</project>
Modified: trunk/perfsonar/ant/rrdma/rrdma-configure-targets.xml
===================================================================
--- trunk/perfsonar/ant/rrdma/rrdma-configure-targets.xml 2006-09-05
10:10:41 UTC (rev 1596)
+++ trunk/perfsonar/ant/rrdma/rrdma-configure-targets.xml 2006-09-05
11:35:08 UTC (rev 1597)
@@ -122,7 +122,7 @@
<entry key="service.r.ma.format" value="rrd"/>
<entry key="service.ma.conf_file" value="${rrd.config.file}"/>
- <entry key="service.ma.message_types"
value="MetadataKeyRequest,SetupDataRequest,MeasurementArchiveStoreRequest"/>
+ <entry key="service.ma.message_types"
value="MetadataKeyRequest,SetupDataRequest,MeasurementArchiveStoreRequest,EchoRequest"/>
<entry key="service.ma.class_name"
value="org.perfsonar.service.measurementArchive.rrdType.RRDTypeMAServiceEngine"/>
<entry key="component.ma.xmldb.db_status" value="off"/>
Modified: trunk/perfsonar/ant/sqlma/sqlma-client-run-targets.xml
===================================================================
--- trunk/perfsonar/ant/sqlma/sqlma-client-run-targets.xml 2006-09-05
10:10:41 UTC (rev 1596)
+++ trunk/perfsonar/ant/sqlma/sqlma-client-run-targets.xml 2006-09-05
11:35:08 UTC (rev 1597)
@@ -175,7 +175,17 @@
</target>
+ <target name="run-echo">
+ <java classname="org.perfsonar.client.testHarness.SOAPClient"
+ classpathref="classpath" fork="true">
+ <arg value="${ma.local}"/>
+ <arg
value="${basedir}/schema/example-instances/sonar/Echo-Req.xml"/>
+ <arg
value="${basedir}/schema/example-instances/sonar/response.xml"/>
+ </java>
+ </target>
+
+
</project>
Modified: trunk/perfsonar/ant/sqlma/sqlma-configure-targets.xml
===================================================================
--- trunk/perfsonar/ant/sqlma/sqlma-configure-targets.xml 2006-09-05
10:10:41 UTC (rev 1596)
+++ trunk/perfsonar/ant/sqlma/sqlma-configure-targets.xml 2006-09-05
11:35:08 UTC (rev 1597)
@@ -126,7 +126,7 @@
<entry key="service.sax_parser.config"
value="${basedir}/src/objects.config"/>
<entry key="service.ma.conf_file" value="${sql.config.file}"/>
- <entry key="service.ma.message_types"
value="MetadataKeyRequest,SetupDataRequest,MeasurementArchiveStoreRequest"/>
+ <entry key="service.ma.message_types"
value="MetadataKeyRequest,SetupDataRequest,MeasurementArchiveStoreRequest,EchoRequest"/>
<entry key="service.ma.class_name"
value="org.perfsonar.service.measurementArchive.sqlType.SQLTypeMAServiceEngine"/>
<entry key="component.ma.xmldb.db_status" value="on"/>
Modified: trunk/perfsonar/conf/service.properties.rrdma
===================================================================
--- trunk/perfsonar/conf/service.properties.rrdma 2006-09-05 10:10:41
UTC (rev 1596)
+++ trunk/perfsonar/conf/service.properties.rrdma 2006-09-05 11:35:08
UTC (rev 1597)
@@ -33,7 +33,7 @@
service.ma.conf_file=/opt/sonar/perfsonar/conf/rrd-database_TEST.xml
# MessageHandler types supported by ma services
-service.ma.message_types=MetadataKeyRequest,SetupDataRequest,MeasurementArchiveStoreRequest
+service.ma.message_types=MetadataKeyRequest,SetupDataRequest,MeasurementArchiveStoreRequest,EchoRequest
# ServiceEngine Type
service.ma.class_name=org.perfsonar.service.measurementArchive.rrdType.RRDTypeMAServiceEngine
Modified: trunk/perfsonar/conf/service.properties.sqlma
===================================================================
--- trunk/perfsonar/conf/service.properties.sqlma 2006-09-05 10:10:41
UTC (rev 1596)
+++ trunk/perfsonar/conf/service.properties.sqlma 2006-09-05 11:35:08
UTC (rev 1597)
@@ -34,7 +34,7 @@
service.ma.conf_file=/opt/sonar/perfsonar/conf/sql-database_TEST.xml
# MessageHandler types supported by ma services
-service.ma.message_types=MetadataKeyRequest,SetupDataRequest,MeasurementArchiveStoreRequest
+service.ma.message_types=MetadataKeyRequest,SetupDataRequest,MeasurementArchiveStoreRequest,EchoRequest
# ServiceEngine Type
service.ma.class_name=org.perfsonar.service.measurementArchive.sqlType.SQLTypeMAServiceEngine
Added: trunk/perfsonar/src/org/perfsonar/commons/messages/EchoRequest.java
Property changes on:
trunk/perfsonar/src/org/perfsonar/commons/messages/EchoRequest.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Modified:
trunk/perfsonar/src/org/perfsonar/service/commons/engine/ActionType.java
===================================================================
--- trunk/perfsonar/src/org/perfsonar/service/commons/engine/ActionType.java
2006-09-05 10:10:41 UTC (rev 1596)
+++ trunk/perfsonar/src/org/perfsonar/service/commons/engine/ActionType.java
2006-09-05 11:35:08 UTC (rev 1597)
@@ -71,5 +71,15 @@
*/
public static final String TOPS_DOWNLOAD_DB = "TOPS_DOWNLOAD_DB";
-
+
+
+
+ // -----------------------------------------
+
+
+
+ public static final String ECHO = "ECHO";
+
+
+
}
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType/RRDTypeMAServiceEngine.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType/RRDTypeMAServiceEngine.java
2006-09-05 10:10:41 UTC (rev 1596)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType/RRDTypeMAServiceEngine.java
2006-09-05 11:35:08 UTC (rev 1597)
@@ -38,8 +38,11 @@
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.util.ResultCodesUtil;
+
/**
* Object implementing the Measurement Archive Service Engine which deals
with RRD
* (Round Robin Database) kind of data storage
@@ -237,6 +240,10 @@
response = storeData(request, true);
}
+ } if (actionType.equals(ActionType.ECHO)) {
+
+ response = getEcho(request);
+
} else {
// invalid action type
@@ -787,7 +794,24 @@
}
+ protected Message getEcho(Message request)
+ throws SystemException, RequestException, DataFormatException {
+ Message response = new Message();
+
+ PerfSONARException pex =
+ new PerfSONARException(
+ "success.echo",
+ "This is the echo response from the
service.");
+
+ ResultCodesUtil.createResultCodeMetadata(response, pex);
+
+ return response;
+
+ }
+
+
+
//---------------------------------- private methods
- r1597 - in trunk/perfsonar: ant/rrdma ant/sqlma conf src/org/perfsonar/commons/messages src/org/perfsonar/service/commons/engine src/org/perfsonar/service/measurementArchive/rrdType, svnlog, 09/05/2006
Archive powered by MHonArc 2.6.16.