Update of /cvsroot/monetdb/clients/src/java
In directory sc8-pr-cvs16:/tmp/cvs-serv15332

Modified Files:
        Makefile.ag build.properties build.xml 
Log Message:
Implementation of the XRPC wrapper for external XQuery engines, as
described in our paper submitted to VLDB07:

 The XRPC wrapper is a SOAP service handler that stores the incoming
 SOAP XRPC request messages in a temporary location, generates an XQuery
 query for this request, and executes it on an XQuery processor.
 
 The generated query is crafted to compute the result of a Bulk XRPC by
 calling the requested function on the parameters found in the message,
 and to generate the SOAP response message in XML using element
 construction.

This XRPC wrapper works with Saxon8-9J and Galax 0.7.2 .
To use the warpper:

java -jar <path-to>/xrpcwrapper-0.1.jar \
     --command "<command-to-run-your-xquery-engine>"

The "command" option is mandatory, since the wrapper has to know how to
run the XQuery engine.  

For example, to use Saxon:
java -jar jars/xrpcwrapper-1.0.jar \
     --command "java -cp <path-to>/saxon8.jar net.sf.saxon.Query"

To use Galax:
java -jar jars/xrpcwrapper-1.0.jar \
     --command "<path-to>/galax-run"

The string value of the "command" option is passed literally to a Java
Proc to be executed.  If any options need to be passed to the XQuery
engine, they should be added to the string.

Examples can be found in the Tests sub-directory
(nl/cwi/monetdb/xrpc/Tests).  The module definition file and the XML
documents needs to be copied to "/tmp" manaully.




Index: Makefile.ag
===================================================================
RCS file: /cvsroot/monetdb/clients/src/java/Makefile.ag,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- Makefile.ag 20 Apr 2007 13:41:25 -0000      1.10
+++ Makefile.ag 20 May 2007 14:10:12 -0000      1.11
@@ -38,6 +38,11 @@
        FILES = jdbcclient-1.5.jar
 }
 
+ant_jar_xrpcwrapper = {
+       DIR = datadir/MonetDB/lib
+       FILES = xrpcwrapper-0.1.jar
+}
+
 ant_create_mjclient = {
        COND = NOT_WIN32
        DIR = bindir

Index: build.xml
===================================================================
RCS file: /cvsroot/monetdb/clients/src/java/build.xml,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- build.xml   3 May 2007 11:40:26 -0000       1.17
+++ build.xml   20 May 2007 14:10:13 -0000      1.18
@@ -26,20 +26,21 @@
 
 -->
 
-<project name="MonetDB_Java_Drivers" default="jar_jdbcclient" basedir=".">
+<project name="MonetDB_Java_Drivers" default="default" basedir=".">
 
   <!-- set global properties for this build -->
-  <property name="srcdir"             value="src" />
-  <property name="libdir"             value="lib" />
-  <property name="jardir"             value="jars" />
-  <property name="builddir"           value="build" />
-  <property name="docdir"             value="doc" />
-  <property name="scriptdir"          value="${builddir}/scripts" />
-  <property name="jdbc-package"       value="nl/cwi/monetdb/jdbc" />
-  <property name="xmldb-package"      value="nl/cwi/monetdb/xmldb" />
-  <property name="mcl-package"        value="nl/cwi/monetdb/mcl" />
-  <property name="client-package"     value="nl/cwi/monetdb/client" />
-  <property name="util-package"       value="nl/cwi/monetdb/util" />
+  <property name="srcdir"               value="src" />
+  <property name="libdir"               value="lib" />
+  <property name="jardir"               value="jars" />
+  <property name="builddir"             value="build" />
+  <property name="docdir"               value="doc" />
+  <property name="scriptdir"            value="${builddir}/scripts" />
+  <property name="jdbc-package"         value="nl/cwi/monetdb/jdbc" />
+  <property name="xmldb-package"        value="nl/cwi/monetdb/xmldb" />
+  <property name="mcl-package"          value="nl/cwi/monetdb/mcl" />
+  <property name="client-package"       value="nl/cwi/monetdb/client" />
+  <property name="xrpcwrapper-package"  value="nl/cwi/monetdb/xrpc/wrapper" />
+  <property name="util-package"         value="nl/cwi/monetdb/util" />
 
   <property file="build.local.properties" />
   <property file="build.properties" />
@@ -52,17 +53,26 @@
     value="${jardir}/monetdb-${MCL_MAJOR}.${MCL_MINOR}-mcl.jar" />
   <property name="xmldb-jar"
     value="${jardir}/monetdb-${JDBC_MAJOR}.${JDBC_MINOR}-xmldb.jar" />
+  <property name="xrpcwrapper-jar"
+    
value="${jardir}/xrpcwrapper-${XRPC_WRAPPER_MAJOR}.${XRPC_WRAPPER_MINOR}.jar" />
 
   <!-- full target -->
   <target name="all">
     <antcall target="jar_jdbc" />
     <antcall target="jar_xmldb" />
     <antcall target="jar_mcl" />
+    <antcall target="jar_util" />
     <antcall target="jar_client" />
+    <antcall target="jar_xrpcwrapper" />
 
     <antcall target="doc" />
   </target>
 
+  <target name="default">
+    <antcall target="jar_jdbcclient" />
+    <antcall target="jar_xrpcwrapper" />
+  </target>
+
   <!-- jar targets -->
   <target name="jar_jdbc" depends="compile_mcl,compile_jdbc"
     unless="uptodate.jdbc-jar">
@@ -99,6 +109,47 @@
     </jar>
   </target>
 
+  <target name="jar_xrpcwrapper"
+    depends="compile_util,compile_xrpcwrapper">
+    <copy file="${srcdir}/${xrpcwrapper-package}/wrapper_functions.xq"
+      overwrite="true"
+      tofile="${builddir}/${xrpcwrapper-package}/wrapper_functions.xq"
+      filtering="yes" />
+    <copy file="${srcdir}/${xrpcwrapper-package}/Tests/auctions.xml"
+      overwrite="true"
+      tofile="${builddir}/${xrpcwrapper-package}/Tests/auctions.xml"
+      filtering="yes" />
+    <copy file="${srcdir}/${xrpcwrapper-package}/Tests/bib.xml"
+      overwrite="true"
+      tofile="${builddir}/${xrpcwrapper-package}/Tests/bib.xml"
+      filtering="yes" />
+    <copy file="${srcdir}/${xrpcwrapper-package}/Tests/persons.xml"
+      overwrite="true"
+      tofile="${builddir}/${xrpcwrapper-package}/Tests/persons.xml"
+      filtering="yes" />
+    <copy file="${srcdir}/${xrpcwrapper-package}/Tests/functions.xq"
+      overwrite="true"
+      tofile="${builddir}/${xrpcwrapper-package}/Tests/functions.xq"
+      filtering="yes" />
+    <copy file="${srcdir}/${xrpcwrapper-package}/Tests/test.xq"
+      overwrite="true"
+      tofile="${builddir}/${xrpcwrapper-package}/Tests/test.xq"
+      filtering="yes" />
+    <jar jarfile="${xrpcwrapper-jar}">
+      <fileset dir="${builddir}">
+        <include name="${util-package}/**/*.class" />
+        <include name="${xrpcwrapper-package}/**/*.class" />
+        <include name="${xrpcwrapper-package}/wrapper_functions.xq" />
+        <include name="${xrpcwrapper-package}/Tests/bib.xml" />
+      </fileset>
+      <manifest>
+        <attribute name="Built-By" value="${user.name}" />
+        <attribute name="Main-Class"
+          value="nl.cwi.monetdb.xrpc.wrapper.XrpcWrapper" />
+      </manifest>
+    </jar>
+  </target>
+
   <!-- a convenience jar of JDBC plus the JdbcClient utililty -->
   <target name="jar_jdbcclient"
     depends="compile_mcl,compile_jdbc,compile_util,compile_client"
@@ -222,6 +273,21 @@
     </javac>
   </target>
 
+  <target name="compile_xrpcwrapper" depends="prepare">
+    <echo message="Compiling XRPC Wrapper" />
+    <javac
+      classpath="${srcdir}"
+      srcdir="${srcdir}"
+      destdir="${builddir}"
+      debug="${debug}"
+      optimize="${optimize}"
+      target="${javac_version}"
+      source="${javac_version}"
+      >
+      <include name="${xrpcwrapper-package}/**/*.java" />
+    </javac>
+  </target>
+
   <!--
   This generates MonetDriver.java and MonetDBDatabase.java from their
   ".java.in" equivalents.  It's required for importing the driver
@@ -328,7 +394,7 @@
 
   <!-- documentation target -->
   <target name="doc"
-    
depends="compile_mcl,compile_jdbc,compile_xmldb,compile_util,compile_client">
+    
depends="compile_mcl,compile_jdbc,compile_xmldb,compile_util,compile_client,compile_xrpcwrapper">
     <javadoc
       destdir="${docdir}"
       author="true"

Index: build.properties
===================================================================
RCS file: /cvsroot/monetdb/clients/src/java/build.properties,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- build.properties    20 Apr 2007 13:41:25 -0000      1.3
+++ build.properties    20 May 2007 14:10:12 -0000      1.4
@@ -29,6 +29,16 @@
 
 
 ##
+## XRPC Wrapper
+##
+
+# major release number
+XRPC_WRAPPER_MAJOR=0
+# minor release number
+XRPC_WRAPPER_MINOR=1
+
+
+##
 ## General
 ##
 


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to