Author: chirino
Date: Tue Dec 13 00:16:17 2011
New Revision: 1213510
URL: http://svn.apache.org/viewvc?rev=1213510&view=rev
Log:
Fixes APLO-109 : Apollo should run with assertions enabled by default unless
APOLLO_ASSERTIONS=false is set in the env.
Modified:
activemq/activemq-apollo/trunk/apollo-distro/src/main/release/bin/apollo
activemq/activemq-apollo/trunk/apollo-distro/src/main/release/bin/apollo.cmd
Modified:
activemq/activemq-apollo/trunk/apollo-distro/src/main/release/bin/apollo
URL:
http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-distro/src/main/release/bin/apollo?rev=1213510&r1=1213509&r2=1213510&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-distro/src/main/release/bin/apollo
(original)
+++ activemq/activemq-apollo/trunk/apollo-distro/src/main/release/bin/apollo
Tue Dec 13 00:16:17 2011
@@ -119,7 +119,13 @@ if $cygwin; then
CYGHOME=`cygpath --windows "$HOME"`
fi
-JVM_FLAGS="${JVM_FLAGS--server -Xmx1G}"
+if [ -z "$JVM_FLAGS" ] ; then
+ JVM_FLAGS="-server -Xmx1G"
+fi
+
+if [ "$APOLLO_ASSERTIONS" != "false" ] ; then
+ JVM_FLAGS="-ea ${JVM_FLAGS}"
+fi
if [ "x$APOLLO_OPTS" != "x" ] ; then
JVM_FLAGS="${JVM_FLAGS} ${APOLLO_OPTS}"
@@ -135,7 +141,11 @@ if [ "x$APOLLO_PROFILE" != "x" ]; then
JVM_FLAGS="-agentlib:yjpagent ${JVM_FLAGS}"
fi
-JVM_FLAGS="${JVM_FLAGS} ${JMX_OPTS--Dcom.sun.management.jmxremote}"
+if [ -z "$JMX_OPTS" ] ; then
+ JMX_OPTS="-Dcom.sun.management.jmxremote"
+fi
+
+JVM_FLAGS="${JVM_FLAGS} ${JMX_OPTS}"
SYSTEM_PROPS="${SYSTEM_PROPS} -Dapollo.home=${APOLLO_HOME}"
if [ ! -z "$APOLLO_BASE" ] ; then
Modified:
activemq/activemq-apollo/trunk/apollo-distro/src/main/release/bin/apollo.cmd
URL:
http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-distro/src/main/release/bin/apollo.cmd?rev=1213510&r1=1213509&r2=1213510&view=diff
==============================================================================
---
activemq/activemq-apollo/trunk/apollo-distro/src/main/release/bin/apollo.cmd
(original)
+++
activemq/activemq-apollo/trunk/apollo-distro/src/main/release/bin/apollo.cmd
Tue Dec 13 00:16:17 2011
@@ -54,6 +54,10 @@ if NOT "x%APOLLO_BASE%" == "x" set BOOTD
if "%JVM_FLAGS%" == "" set JVM_FLAGS=-server -Xmx1G
+if "%APOLLO_ASSERTIONS%"=="false" goto noAPOLLO_ASSERTIONS
+ set JVM_FLAGS=-ea %JVM_FLAGS%
+:noAPOLLO_ASSERTIONS
+
if "x%APOLLO_OPTS%" == "x" goto noAPOLLO_OPTS
set JVM_FLAGS=%JVM_FLAGS% %APOLLO_OPTS%
:noAPOLLO_OPTS