Author: bstansberry(a)jboss.com
Date: 2008-10-28 14:43:06 -0400 (Tue, 28 Oct 2008)
New Revision: 2013
Added:
trunk/mod_cluster/src/demo/resources/run-demo.bat
trunk/mod_cluster/src/demo/resources/run-demo.sh
Modified:
trunk/mod_cluster/build-demo.xml
Log:
Get launch scripts in the demo build
Modified: trunk/mod_cluster/build-demo.xml
===================================================================
--- trunk/mod_cluster/build-demo.xml 2008-10-28 17:42:59 UTC (rev 2012)
+++ trunk/mod_cluster/build-demo.xml 2008-10-28 18:43:06 UTC (rev 2013)
@@ -31,25 +31,52 @@
</path>
<target name="main" depends="init, compile-demo">
- <jar destfile="${demo.output.client}/${demo.client.jar}">
+ <jar destfile="${demo.output.client}/lib/${demo.client.jar}">
<fileset dir="${demo.output.classes}"
excludes="**/server/**"></fileset>
<manifest>
<attribute name="Main-Class"
value="org.jboss.modcluster.demo.client.ModClusterDemo"/>
</manifest>
- </jar>
+ </jar>
+ <copy todir="${demo.output.client}">
+ <fileset dir="${demo.src.resources}">
+ <include name="run-demo.sh"/>
+ <include name="run-demo.bat"/>
+ </fileset>
+ </copy>
+ <copy todir="${demo.output.client}/lib">
+ <fileset dir="${demo.dependencies.lib}">
+ <include name="jcommon.jar"/>
+ <include name="jfreechart.jar"/>
+ </fileset>
+ </copy>
<war destfile="${demo.output.server}/${demo.server.war}"
webxml="${demo.src.resources}/web.xml">
<classes dir="${demo.output.classes}"
excludes="**/client/**"></classes>
<lib dir="${demo.dependencies.lib}">
<include name="commons-httpclient.jar"/>
<include name="commons-codec.jar"/>
</lib>
- </war>
+ </war>
+
+ <fixcrlf srcdir="${demo.output.client}"
+ eol="lf" eof="remove"
+ includes="**/*.sh"/>
+
+ <fixcrlf srcdir="${demo.output.client}"
+ eol="crlf" eof="remove"
+ includes="**/*.bat, **/*.cmd"/>
+
+ <chmod perm="+x">
+ <fileset dir="${demo.output.client}">
+ <include name="**/*.sh"/>
+ </fileset>
+ </chmod>
</target>
<target name="init">
<mkdir dir="${demo.output}"/>
<mkdir dir="${demo.output.classes}"></mkdir>
<mkdir dir="${demo.output.client}"/>
+ <mkdir dir="${demo.output.client}/lib"/>
<mkdir dir="${demo.output.server}"/>
</target>
Added: trunk/mod_cluster/src/demo/resources/run-demo.bat
===================================================================
--- trunk/mod_cluster/src/demo/resources/run-demo.bat (rev 0)
+++ trunk/mod_cluster/src/demo/resources/run-demo.bat 2008-10-28 18:43:06 UTC (rev 2013)
@@ -0,0 +1,12 @@
+# TODO Make this dynamic as it is in the shell script
+set "CP=.\lib\mod-cluster-demo.jar;.\lib\jcommon.jar;.\lib\jfreechart.jar"
+
+set "OPTS=-Xmn200M -Xmx300M -Xms300M -Xss8K -XX:ThreadStackSize=8k
-XX:CompileThreshold=100 -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=90
-XX:MaxTenuringThreshold=31"
+
+# Tell the HttpURLConnection pool to maintain 400 connections max
+set "OPTS=%OPTS% -Dhttp.maxConnections=400"
+
+# Set defaults for the load balancer
+set "OPTS=%OPTS% -Dmod_cluster.proxy.host=localhost
-Dmod_cluster.proxy.port=8000"
+
+java -classpath %CP% %OPTS% org.jboss.modcluster.demo.client.ModClusterDemo
Added: trunk/mod_cluster/src/demo/resources/run-demo.sh
===================================================================
--- trunk/mod_cluster/src/demo/resources/run-demo.sh (rev 0)
+++ trunk/mod_cluster/src/demo/resources/run-demo.sh 2008-10-28 18:43:06 UTC (rev 2013)
@@ -0,0 +1,16 @@
+CP=./classes
+
+for i in lib/*.jar
+do
+ CP=$CP:./${i}
+done
+
+OPTS="-Xmn200M -Xmx300M -Xms300M -Xss8K -XX:ThreadStackSize=8k
-XX:CompileThreshold=100 -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=90
-XX:MaxTenuringThreshold=31"
+
+# Tell the HttpURLConnection pool to maintain 400 connections max
+OPTS="$OPTS -Dhttp.maxConnections=400"
+
+# Set defaults for the load balancer
+OPTS="$OPTS -Dmod_cluster.proxy.host=localhost -Dmod_cluster.proxy.port=8000"
+
+java -classpath $CP $OPTS org.jboss.modcluster.demo.client.ModClusterDemo
Show replies by date