perfsonar-dev - r2114 - in trunk/perfsonar: ant/xmlls doc/ls src/org/perfsonar/service/lookupService/xmlType
Subject: perfsonar development work
List archive
r2114 - in trunk/perfsonar: ant/xmlls doc/ls src/org/perfsonar/service/lookupService/xmlType
Chronological Thread
- From:
- To:
- Subject: r2114 - in trunk/perfsonar: ant/xmlls doc/ls src/org/perfsonar/service/lookupService/xmlType
- Date: Wed, 21 Feb 2007 07:52:43 -0500
Author: mac
Date: 2007-02-21 07:52:42 -0500 (Wed, 21 Feb 2007)
New Revision: 2114
Added:
trunk/perfsonar/doc/ls/LS_functionality_specification.doc
trunk/perfsonar/doc/ls/LS_installation_actions.doc
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/EchoRequestAction.java
Removed:
trunk/perfsonar/doc/ls/LS_functionality_specificatio.doc
trunk/perfsonar/doc/ls/LS_instalaltion_actions.doc
Modified:
trunk/perfsonar/ant/xmlls/configure-targets.xml
trunk/perfsonar/ant/xmlls/deploy-targets.xml
trunk/perfsonar/ant/xmlls/pre-install-targets.xml
trunk/perfsonar/ant/xmlls/test-targets.xml
trunk/perfsonar/doc/ls/LS_interface_appendix.doc
trunk/perfsonar/doc/ls/LS_interface_specification.doc
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSLookupAction.java
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/XmlTypeLSServiceEngine.java
Log:
I made these changes in XML-LS-RELEASE-1.1 branch, what was wrong...
All these changes now goes to trunk. All changes are in XML-LS-RELEASE-1.1
branch logs but in general:
- release target added
- test targets added (for echo)
- changes in configuration process (pre-install & configure & deploy)
- many bugs fixed
- EchoRequest support for echo.ls eventType (with parameters)
- new version of documentation
Modified: trunk/perfsonar/ant/xmlls/configure-targets.xml
===================================================================
--- trunk/perfsonar/ant/xmlls/configure-targets.xml 2007-02-21 12:48:46
UTC (rev 2113)
+++ trunk/perfsonar/ant/xmlls/configure-targets.xml 2007-02-21 12:52:42
UTC (rev 2114)
@@ -96,7 +96,7 @@
<echo message="====================================="/>
<echo/>
- <input message="LS Storage -- XML database type]"
+ <input message="LS Storage -- XML database type (preferred one is
HTTP, because it's much faster)"
addproperty="in.ls_storage_type"
validargs="http,xmlrpc"
defaultvalue="http"/>
Modified: trunk/perfsonar/ant/xmlls/deploy-targets.xml
===================================================================
--- trunk/perfsonar/ant/xmlls/deploy-targets.xml 2007-02-21 12:48:46
UTC (rev 2113)
+++ trunk/perfsonar/ant/xmlls/deploy-targets.xml 2007-02-21 12:52:42
UTC (rev 2114)
@@ -86,11 +86,12 @@
<echo>into Tomcat configuration file server.xml</echo>
<echo>(${tomcat.home}/conf/server.xml)</echo>
<echo>inside existing xml tag 'Host':</echo>
+ <echo/>
+ <echo>(You may copy XML part (without [echo]): </echo>
+ <echo message=" <Context path='/${deploy.root}'
docBase='${service.home}/${service.name}'> </Context>"/>
+ <!-- echo message="
docBase='${service.home}/${service.name}'>"/ -->
+ <!-- echo message=" </Context>"/ -->
<echo></echo>
- <echo message=" <Context path='/${deploy.root}'"/>
- <echo message="
docBase='${service.home}/${service.name}'>"/>
- <echo message=" </Context>"/>
- <echo></echo>
<echo>Please, do it now. I will wait for you.</echo>
<input message="Press Return key ..."/>
Modified: trunk/perfsonar/ant/xmlls/pre-install-targets.xml
===================================================================
--- trunk/perfsonar/ant/xmlls/pre-install-targets.xml 2007-02-21 12:48:46
UTC (rev 2113)
+++ trunk/perfsonar/ant/xmlls/pre-install-targets.xml 2007-02-21 12:52:42
UTC (rev 2114)
@@ -3,7 +3,7 @@
<target name="pre-install"
- depends="init-info,
+ depends="show-info,
get-inputs,
confirm-inputs,
get-tomcat,
@@ -20,9 +20,33 @@
<!-- property name="tomcat.download.url"
value="http://monstera.man.poznan.pl/tomcat.tar.gz" /-->
- <property name="tomcat.tempdir" value="/tmp/temp" />
<property name="tomcat.tempfile" value="apache-tomcat-5.5.20"/> <!--
without .tar.gz -->
+ <target name="show-info">
+ <echo>Pre-install</echo>
+ <echo/>
+ <echo>---- Welcome in perfSONAR LookupService installation script
----</echo>
+ <echo/>
+ <echo>You're about to install LookupService that may be also called
LS during the installation process. The installation guide is accessible on
http://wiki.perfsonar.net/jra1-wiki/index.php/Installation_LS_1.1#Lookup_service_installation
web page</echo>
+ <echo/>
+ <echo>Requirements:</echo>
+ <echo/>
+ <echo> 1. Java 1.5.x</echo>
+ <echo> 2. Ant 1.6.x (we're sure you've already got it installed as
you run the installation process)</echo>
+ <echo> 3. eXist DB XML - see Exist DB Installation Guide for
LS:</echo>
+ <echo>
http://wiki.perfsonar.net/jra1-wiki/index.php/Exist_DB_Installation_Guide_for_LS</echo>
+ <echo> 4. JAVA_HOME environment variable set to your Java
directory</echo>
+ <echo/>
+ <input message="Do you want to proceed? Just press ENTER to continue.
Otherwise CTRL-C stops the process immediately"/>
+
+ <echo>Preparing the installation of XML Lookup Service...</echo>
+ <echo></echo>
+ <echo>Answer to all questions. If you go wrong, cancel (ctrl-c) and
start again.</echo>
+ <echo></echo>
+
+
+ </target>
+
<target name="get-inputs">
<!-- tomcat -->
@@ -41,6 +65,11 @@
addproperty="tomcat.home"
defaultvalue="${default_tomcat.home}" />
+ <property name="default_tomcat.tempdir" value="/tmp"/>
+ <input message="Temporary directory [${default_tomcat.tempdir}]?"
+ addproperty="tomcat.tempdir"
+ defaultvalue="${default_tomcat.tempdir}"/>
+
<property name="default_hostname" value="localhost"/>
<input message="Enter webserver hostname (please type your host and
domain name - not localhost)"
addproperty="target.server"
@@ -80,22 +109,13 @@
<fail if="do.abort">Files have not been modified. Configure the
service manually by editing configuration files, or run configurator
again.</fail>
</target>
- <target name="init-info">
- <echo>Pre-install</echo>
-
- <echo>Preparing the installation of XML Lookup Service...</echo>
-
- <echo></echo>
- <echo>Answer to all questions. If you go wrong, cancel (ctrl-c) and
start again.</echo>
- <echo></echo>
- </target>
-
-
<!-- INFO: download Tomcat if necessary -->
<target name="get-tomcat" if="tomcat.install.decision">
<echo>Download Tomcat</echo>
<property name="tomcat.tar"
value="${tomcat.tempdir}/${tomcat.tempfile}.tar.gz"/>
+
+ <mkdir dir="${tomcat.tempdir}"/>
<get src="${tomcat.download.url}"
dest="${tomcat.tar}"
verbose="true"
Modified: trunk/perfsonar/ant/xmlls/test-targets.xml
===================================================================
--- trunk/perfsonar/ant/xmlls/test-targets.xml 2007-02-21 12:48:46 UTC (rev
2113)
+++ trunk/perfsonar/ant/xmlls/test-targets.xml 2007-02-21 12:52:42 UTC (rev
2114)
@@ -12,22 +12,27 @@
-->
- <target name="test" depends="">
+ <target name="test" depends="">
<echo>For testing web service please run:</echo>
<echo/>
- <echo> ant -f build-xmlls client-register</echo>
- <echo> ant -f build-xmlls client-query</echo>
- <echo> ant -f build-xmlls client-keepalive</echo>
- <echo> ant -f build-xmlls client-deregister</echo>
+ <echo> ant -f build-xmlls.xml client-echo</echo>
+ <echo> ant -f build-xmlls.xml client-register</echo>
+ <echo> ant -f build-xmlls.xml client-query</echo>
+ <echo> ant -f build-xmlls.xml client-keepalive</echo>
+ <echo> ant -f build-xmlls.xml client-deregister</echo>
<echo/>
<echo>For testing service without Tomcat (just service functionality)
please run:</echo>
<echo/>
- <echo> ant -f build-xmlls test-register</echo>
- <echo> ant -f build-xmlls test-query</echo>
- <echo> ant -f build-xmlls test-keepalive</echo>
- <echo> ant -f build-xmlls test-deregister</echo>
+ <echo> ant -f build-xmlls.xml test-echo</echo>
+ <echo> ant -f build-xmlls.xml test-register</echo>
+ <echo> ant -f build-xmlls.xml test-query</echo>
+ <echo> ant -f build-xmlls.xml test-keepalive</echo>
+ <echo> ant -f build-xmlls.xml test-deregister</echo>
+
+ <echo>We suggest to run "test-echo" first.</echo>
+ <echo> ant -f build-xmlls.xml test-echo</echo>
</target>
@@ -140,11 +145,9 @@
<copy file="conf/components.properties"
todir="build/perfsonar/conf"/>
<copy file="conf/service.properties"
todir="build/perfsonar/conf"/>
<copy file="conf/log4j.properties" todir="build/perfsonar/conf"/>
- </target>
+ </target>
-
-
<!-- LS Lookup (Query) test -->
<target name="test-query"
Deleted: trunk/perfsonar/doc/ls/LS_functionality_specificatio.doc
Copied: trunk/perfsonar/doc/ls/LS_functionality_specification.doc (from rev
2110, branches/XML-LS-RELEASE-1.1/doc/ls/LS_functionality_specification.doc)
Deleted: trunk/perfsonar/doc/ls/LS_instalaltion_actions.doc
Copied: trunk/perfsonar/doc/ls/LS_installation_actions.doc (from rev 2110,
branches/XML-LS-RELEASE-1.1/doc/ls/LS_installation_actions.doc)
Modified: trunk/perfsonar/doc/ls/LS_interface_appendix.doc
===================================================================
(Binary files differ)
Modified: trunk/perfsonar/doc/ls/LS_interface_specification.doc
===================================================================
(Binary files differ)
Copied:
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/EchoRequestAction.java
(from rev 2110,
branches/XML-LS-RELEASE-1.1/src/org/perfsonar/service/lookupService/xmlType/EchoRequestAction.java)
Modified:
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSLookupAction.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSLookupAction.java
2007-02-21 12:48:46 UTC (rev 2113)
+++
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSLookupAction.java
2007-02-21 12:52:42 UTC (rev 2114)
@@ -138,23 +138,16 @@
String[] results;
- System.out.println(" LSq0,"+System.currentTimeMillis());
-
- ///////////////////////////////////////////////////////////////
/* XQuery */
XmlDbResult edbres = (XmlDbResult)xmlStorageManager.fetch(query);
results = (String[])edbres.getResultAsStringArray();
- ///////////////////////////////////////////////////////////////
+
- System.out.println(" LSq1,"+System.currentTimeMillis());
-
logger.debug("XmlTypeLSServiceEngine: Got [["+
results.length+"]] results from DB");
- //TODO: if results.length==0 --> return error code or not?
-
//create ServiceEngineResponse and put there the results
Message response = new Message();
@@ -185,6 +178,16 @@
responseData.setDatum(datum);
}
+
+// TODO: what to do with it?
+// if no results are returned create empty datum
+// if (results.length==0) {
+// org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.Datum datum =
+// new
org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.Datum();
+//
+// datum.setValue("");
+// responseData.setDatum(datum);
+// }
//Encapsulate Data in Response Message
response.addChild(responseData);
Modified:
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/XmlTypeLSServiceEngine.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/XmlTypeLSServiceEngine.java
2007-02-21 12:48:46 UTC (rev 2113)
+++
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/XmlTypeLSServiceEngine.java
2007-02-21 12:52:42 UTC (rev 2114)
@@ -208,7 +208,10 @@
} else if (actionType.equals(ActionType.ECHO)) {
- response = getEcho(request);
+ XmlDbStorageManager xmlDbStorageManager =
+ getStorageManager(smType);
+ LSAction action = new EchoRequestAction(xmlDbStorageManager);
+ response = action.performAction(request);
} else {
@@ -254,22 +257,8 @@
}
- 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 Lookup Service");
- ResultCodesUtil.createResultCodeMetadata(response, pex);
-
- return response;
-
- }
-
-
} //XmlTypeLSServiceEngine
- r2114 - in trunk/perfsonar: ant/xmlls doc/ls src/org/perfsonar/service/lookupService/xmlType, svnlog, 02/21/2007
Archive powered by MHonArc 2.6.16.