Author: jleroux
Date: Mon Jun 13 10:34:39 2016
New Revision: 1748173
URL: http://svn.apache.org/viewvc?rev=1748173&view=rev
Log:
This closes "Add the -server JVM argument to Ant targets like start and
tools/start*.bat files" https://issues.apache.org/jira/browse/OFBIZ-7321
I kept things as simple as possible. I only changed the following Ant targets
start
start-secure
start-batch
start-batch-secure
run-test
I also changed the startofbiz.bat file. The other start*.bat are for the POS
and it's not expected to run on a server.
I put a mention when using "java -jar ofbiz.jar -u" (start)
I will add a mention in "Technical+Production+Setup+Guide" wiki page about
using "java -jar ofbiz.jar"
Modified:
ofbiz/trunk/build.xml
ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupCommandUtil.java
ofbiz/trunk/tools/startofbiz.bat
Modified: ofbiz/trunk/build.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/build.xml?rev=1748173&r1=1748172&r2=1748173&view=diff
==============================================================================
--- ofbiz/trunk/build.xml (original)
+++ ofbiz/trunk/build.xml Mon Jun 13 10:34:39 2016
@@ -578,6 +578,7 @@ under the License.
<java jar="ofbiz.jar" fork="true">
<jvmarg value="${memory.initial.param}"/>
<jvmarg value="${memory.max.param}"/>
+ <jvmarg value="-server"/>
<arg value="--start"/>
<arg value="--portoffset=${portoffset}"/>
</java>
@@ -587,6 +588,7 @@ under the License.
<java jar="ofbiz.jar" fork="true">
<jvmarg value="${memory.initial.param}"/>
<jvmarg value="${memory.max.param}"/>
+ <jvmarg value="-server"/>
<jvmarg
value="-javaagent:${ofbiz.home.dir}/tools/security/notsoserial/notsoserial-1.0-SNAPSHOT.jar"/>
<jvmarg
value="-Dnotsoserial.whitelist=${ofbiz.home.dir}/tools/security/notsoserial/empty.txt"/>
<jvmarg
value="-Dnotsoserial.dryrun=${ofbiz.home.dir}/tools/security/notsoserial/is-deserialized.txt"/>
@@ -600,6 +602,7 @@ under the License.
<java jar="ofbiz.jar" fork="true" spawn="true">
<jvmarg value="${memory.initial.param}"/>
<jvmarg value="${memory.max.param}"/>
+ <jvmarg value="-server"/>
<arg value="--start"/>
<arg value="--portoffset=${portoffset}"/>
</java>
@@ -609,6 +612,7 @@ under the License.
<java jar="ofbiz.jar" fork="true" spawn="true">
<jvmarg value="${memory.initial.param}"/>
<jvmarg value="${memory.max.param}"/>
+ <jvmarg value="-server"/>
<jvmarg
value="-javaagent:${ofbiz.home.dir}/tools/security/notsoserial/notsoserial-1.0-SNAPSHOT.jar"/>
<jvmarg
value="-Dnotsoserial.whitelist=${ofbiz.home.dir}/tools/security/notsoserial/empty.txt"/>
<jvmarg
value="-Dnotsoserial.dryrun=${ofbiz.home.dir}/tools/security/notsoserial/is-deserialized.txt"/>
@@ -622,6 +626,7 @@ under the License.
<java jar="ofbiz.jar" fork="true">
<jvmarg value="${memory.initial.param}"/>
<jvmarg value="${memory.max.param}"/>
+ <jvmarg value="-server"/>
<jvmarg value="-Xnoagent"/>
<jvmarg value="-Djava.compiler=NONE"/>
<jvmarg value="-Xdebug"/>
@@ -1220,6 +1225,7 @@ under the License.
<java jar="ofbiz.jar" fork="true" resultproperty="test.result">
<jvmarg value="${memory.initial.param}"/>
<jvmarg value="${memory.max.param}"/>
+ <jvmarg value="-server"/>
<arg value="--test"/>
<arg value="component=${test.component}"/>
<arg value="--test"/>
Modified:
ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupCommandUtil.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupCommandUtil.java?rev=1748173&r1=1748172&r2=1748173&view=diff
==============================================================================
---
ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupCommandUtil.java
(original)
+++
ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupCommandUtil.java
Mon Jun 13 10:34:39 2016
@@ -128,7 +128,7 @@ final class StartupCommandUtil {
.build();
private static final Option START = Option.builder("u")
.longOpt(StartupOption.START.getName())
- .desc("Start OFBiz")
+ .desc("Start OFBiz (beware of possible needed JVM arguments...)")
.hasArg(false)
.build();
private static final Option STATUS = Option.builder("s")
Modified: ofbiz/trunk/tools/startofbiz.bat
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/tools/startofbiz.bat?rev=1748173&r1=1748172&r2=1748173&view=diff
==============================================================================
--- ofbiz/trunk/tools/startofbiz.bat (original)
+++ ofbiz/trunk/tools/startofbiz.bat Mon Jun 13 10:34:39 2016
@@ -55,8 +55,8 @@ rem "%JAVA_HOME%\bin\java" -Xms128M -Xmx
rem ### Simple easy to read line
cd %OFBIZ_HOME%
echo on
-"%JAVA_HOME%\bin\java" -Xms128M -Xmx512M -jar ofbiz.jar
+"%JAVA_HOME%\bin\java" -Xms128M -Xmx512M -server -jar ofbiz.jar
echo off
rem ### If you would prefer the console output to be logged rather than
displayed switch out the above line for this one
-rem "%JAVA_HOME%\bin\java" -Xms128M -Xmx512M -jar ofbiz.jar >
runtime\logs\console.log
+rem "%JAVA_HOME%\bin\java" -Xms128M -Xmx512M -server -jar ofbiz.jar >
runtime\logs\console.log