[Jboss-cvs] JBossAS SVN: r56335 - branches/Branch_3_2/system/src/bin
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Aug 28 08:36:27 EDT 2006
Author: dimitris at jboss.org
Date: 2006-08-28 08:36:24 -0400 (Mon, 28 Aug 2006)
New Revision: 56335
Modified:
branches/Branch_3_2/system/src/bin/run.sh
Log:
JBAS-3458, conditionally set the -server flag, if supported
Modified: branches/Branch_3_2/system/src/bin/run.sh
===================================================================
--- branches/Branch_3_2/system/src/bin/run.sh 2006-08-28 12:33:41 UTC (rev 56334)
+++ branches/Branch_3_2/system/src/bin/run.sh 2006-08-28 12:36:24 UTC (rev 56335)
@@ -120,25 +120,26 @@
JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_BOOT_CLASSPATH:$JAVAC_JAR"
fi
-# If JAVA_OPTS is not set try check for Hotspot
-if [ "x$JAVA_OPTS" = "x" ]; then
+# If -server not set in JAVA_OPTS, set it, if supported
+SERVER_SET=`echo $JAVA_OPTS | $GREP "\-server"`
+if [ "x$SERVER_SET" = "x" ]; then
# Check for SUN(tm) JVM w/ HotSpot support
if [ "x$HAS_HOTSPOT" = "x" ]; then
- HAS_HOTSPOT=`$JAVA -version 2>&1 | $GREP -i HotSpot`
+ HAS_HOTSPOT=`"$JAVA" -version 2>&1 | $GREP -i HotSpot`
fi
# Enable -server if we have Hotspot, unless we can't
if [ "x$HAS_HOTSPOT" != "x" ]; then
# MacOS does not support -server flag
if [ "$darwin" != "true" ]; then
- JAVA_OPTS="-server"
+ JAVA_OPTS="-server $JAVA_OPTS"
fi
fi
fi
# Setup JBoss sepecific properties
-JAVA_OPTS="$JAVA_OPTS -Dprogram.name=$PROGNAME"
+JAVA_OPTS="-Dprogram.name=$PROGNAME $JAVA_OPTS"
# Setup the java endorsed dirs
JBOSS_ENDORSED_DIRS="$JBOSS_HOME/lib/endorsed"
More information about the jboss-cvs-commits
mailing list