From: Bryan T. <tho...@us...> - 2007-03-18 12:59:37
|
Update of /cvsroot/cweb/bigdata In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12438 Modified Files: .cvsignore Added Files: build.xml build.properties Log Message: A little more work setting up for the services architecture. Index: .cvsignore =================================================================== RCS file: /cvsroot/cweb/bigdata/.cvsignore,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** .cvsignore 8 Mar 2007 18:14:05 -0000 1.11 --- .cvsignore 17 Mar 2007 23:14:59 -0000 1.12 *************** *** 11,12 **** --- 11,17 ---- test_* com.bigdata.journal.StressTestConcurrent.comparison.csv + bigdata.jar + run.bat + ant-build + ant-deploy + log --- NEW FILE: build.xml --- <project name="bigdata" default="deploy" basedir="."> <property file="build.properties" /> <path id="build.classpath"> <fileset dir="${bigdata.dir}/lib"> <include name="*.jar" /> </fileset> </path> <path id="runtime.classpath"> <pathelement location="${build.dir}" /> <path refid="build.classpath" /> </path> <target name="clean"> <delete dir="${build.dir}" /> </target> <target name="prepare"> <mkdir dir="${build.dir}" /> </target> <!-- @todo drop dbcache, extser, concurrent. --> <!-- FIXME Use JARs for other packages, NOT compiled classes. This is especially important because of the licenses on some packages. --> <target name="compile" depends="prepare"> <mkdir dir="${build.dir}" /> <javac destdir="${build.dir}" classpathref="build.classpath" debug="on"> <src path="${cweb.dir}/commons/src/java" /> <src path="${cweb.dir}/concurrent/src/java" /> <src path="${cweb.dir}/dbcache/src/java" /> <src path="${cweb.dir}/extser/src/java" /> <src path="${cweb.dir}/junit-ext/src/java" /> <src path="${cweb.dir}/lgpl-utils/src/java" /> <src path="${bigdata.dir}/src/java" /> <src path="${bigdata.dir}/src/test" /> </javac> <!-- <copy toDir="${build.dir}/classes"> <fileset dir="${src.dir}"> <exclude name="**/*.java"/> </fileset> </copy> --> </target> <target name="jar" depends="compile"> <jar destfile="${jar.name}"> <fileset dir="${build.dir}" /> <manifest> <attribute name="Main-Class" value="org/CognitiveWeb/bigdata/TestServiceDiscovery" /> </manifest> </jar> </target> <!-- Prepare a bigdata deployment. you need to copy the deployment directory to an HTTP server so that downloadable code can be resolved for activatable services, e.g., assuming: codebase=http://proto.cognitiveweb.org/maven-repository/bigdata/jars/ do: scp ant-deploy/* br...@pr...:/home/groups/c/cw/cweb/maven-repository/bigdata/jars then verfify that you can see the resources in a web browser at that codebase URL (e.g., the files all have the right permissions on the server). You MUST then unarchive bigdata.jar into this directory so that the actual class files themselves are available for download (only .class files are downloaded, NOT JARs). Finally, the code that will expose services with downloadable code MUST set -Djava.rmi.server.codebase=http://proto.cognitiveweb.org/maven-repository/bigdata/jars/ in order for the correct codebase property to be communicated to clients that will then download code from that HTTP server. Note: the trailing '/' is REQUIRED in your codebase or the generated URLs will NOT resolve correctly. See http://java.sun.com/j2se/1.4.2/docs/guide/rmi/javarmiproperties.html for some guidence. Among other things, it suggests: -Djava.rmi.server.logCalls=true as an aid to debuging. Also try setting -Dcom.sun.jini.reggie.proxy.debug=1 for the client, e.g., the service browser. Also see: http://www.adtmag.com/java/articleold.aspx?id=1159 for some (very good) guidence in debugging jini services. See http://archives.java.sun.com/cgi-bin/wa?A2=ind0512&L=jini-users&P=R391&I=-3 for instructions on setting up an "download jar" (dljar) ANT task that can make life much simpler (one supposes). @todo you need to install the client and server deployments on machines that will run clients or servers respectively. --> <!-- @todo sign jars? version code --> <!-- drop unit tests from the jar (except for testing); --> <!-- @todo break into client deploy (minimum startup for clients) and server deploy (minimum startup for servers) plus a deployment for downloadedable code for activatable services (which is how the services will actually run). Note that (ICU is only required for clients). --> <!-- write a test to validate the pre- and post- conditions for deployment. --> <!-- add properties to build.properties for the http server location, failover sites, etc. --> <target name="deploy" depends="jar"> <copy toDir="${deploy.dir}"> <fileset dir="${bigdata.dir}/lib"> <!-- do not deploy the jini jars for download - the client must have them available locally, e.g., from the jini starter kit. --> <exclude name="reggie.jar" /> <exclude name="sun-util.jar" /> <exclude name="jini-core.jar" /> <exclude name="jini-ext.jar" /> <exclude name="**/*.dll" /> <exclude name="**/*.so" /> </fileset> <fileset dir="${bigdata.dir}/LEGAL"> </fileset> <fileset file="${jar.name}/"> </fileset> </copy> </target> </project> --- NEW FILE: build.properties --- cweb.dir=.. bigdata.dir=. build.dir=ant-build deploy.dir=ant-deploy codebase=http://proto.cognitiveweb.org/maven-repository/bigdata/jars/ jar.name=bigdata.jar |