You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by js...@apache.org on 2006/03/16 01:59:05 UTC
svn commit: r386232 - in /geronimo/trunk/modules/scripts/src/resources/bin:
geronimo.bat geronimo.sh
Author: jsisson
Date: Wed Mar 15 16:59:04 2006
New Revision: 386232
URL: http://svn.apache.org/viewcvs?rev=386232&view=rev
Log:
GERONIMO-1745 - * The JPDA_OPTS environment variable is not honoured by geronimo.bat and is inconsistent with geronimo.sh (merged from 1.1 branch).
Modified:
geronimo/trunk/modules/scripts/src/resources/bin/geronimo.bat
geronimo/trunk/modules/scripts/src/resources/bin/geronimo.sh
Modified: geronimo/trunk/modules/scripts/src/resources/bin/geronimo.bat
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/scripts/src/resources/bin/geronimo.bat?rev=386232&r1=386231&r2=386232&view=diff
==============================================================================
--- geronimo/trunk/modules/scripts/src/resources/bin/geronimo.bat (original)
+++ geronimo/trunk/modules/scripts/src/resources/bin/geronimo.bat Wed Mar 15 16:59:04 2006
@@ -81,6 +81,17 @@
@REM JPDA_ADDRESS (Optional) Java runtime options used when the "jpda start"
@REM command is executed. The default is "8000".
@REM
+@REM JPDA_OPTS (Optional) JPDA command line options.
+@REM Only set this if you need to use some unusual JPDA
+@REM command line options. This overrides the use of the
+@REM other JPDA_* environment variables.
+@REM Defaults to JPDA command line options contructed from
+@REM the JPDA_ADDRESS, JPDA_SUSPEND and JPDA_TRANSPORT
+@REM environment variables.
+@REM
+@REM JPDA_SUSPEND (Optional) Suspend the JVM before the main class is loaded.
+@REM Valid values are 'y' and 'n'. The default is "n".
+@REM
@REM JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start"
@REM command is executed. The default is "dt_socket".
@REM Note that "dt_socket" is the default instead of "dt_shmem"
@@ -177,15 +188,6 @@
set GERONIMO_TMPDIR=%GERONIMO_BASE%\var\temp
:gotTmpdir
-@REM ----- Execute The Requested Command ---------------------------------------
-@if "%GERONIMO_ENV_INFO%" == "off" goto skipEnvInfo
-echo Using GERONIMO_BASE: %GERONIMO_BASE%
-echo Using GERONIMO_HOME: %GERONIMO_HOME%
-echo Using GERONIMO_TMPDIR: %GERONIMO_TMPDIR%
-if "%_REQUIRE_JDK%" == "1" echo Using JAVA_HOME: %JAVA_HOME%
-if "%_REQUIRE_JDK%" == "0" echo Using JRE_HOME: %JRE_HOME%
-:skipEnvInfo
-
set _EXECJAVA=%_RUNJAVA%
@REM MAINCLASS required for jdb debugger as it requires the mainclass
@REM parameter. For other commands, the main class is obtained from
@@ -196,6 +198,9 @@
if not ""%1"" == ""jpda"" goto noJpda
set JPDA=jpda
+if not "%JPDA_SUSPEND%" == "" goto gotJpdaSuspend
+set JPDA_SUSPEND=n
+:gotJpdaSuspend
if not "%JPDA_TRANSPORT%" == "" goto gotJpdaTransport
@REM Note that "dt_socket" is the default instead of "dt_shmem"
@REM because eclipse does not support "dt_shmem".
@@ -204,9 +209,26 @@
if not "%JPDA_ADDRESS%" == "" goto gotJpdaAddress
set JPDA_ADDRESS=8000
:gotJpdaAddress
+if not "%JPDA_OPTS%" == "" goto gotJpdaOpts
+set JPDA_OPTS=-Xdebug -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=%JPDA_SUSPEND%
+set GERONIMO_OPTS=%GERONIMO_OPTS% %JPDA_OPTS%
+:gotJpdaOpts
shift
:noJpda
+@REM ----- Execute The Requested Command ---------------------------------------
+@if "%GERONIMO_ENV_INFO%" == "off" goto skipEnvInfo
+echo Using GERONIMO_BASE: %GERONIMO_BASE%
+echo Using GERONIMO_HOME: %GERONIMO_HOME%
+echo Using GERONIMO_TMPDIR: %GERONIMO_TMPDIR%
+if "%_REQUIRE_JDK%" == "1" echo Using JAVA_HOME: %JAVA_HOME%
+if "%_REQUIRE_JDK%" == "0" echo Using JRE_HOME: %JRE_HOME%
+if not "%JPDA%" == "jpda" goto skipJpdaEnvInfo
+@REM output JPDA info to assist diagnosing JPDA debugger config issues.
+echo Using JPDA_OPTS: %JPDA_OPTS%
+:skipJpdaEnvInfo
+:skipEnvInfo
+
if ""%1"" == ""debug"" goto doDebug
if ""%1"" == ""run"" goto doRun
if ""%1"" == ""start"" goto doStart
@@ -286,16 +308,11 @@
@REM Execute Java with the applicable properties
if not "%JDB%" == "" goto doJDB
-if not "%JPDA%" == "" goto doJpda
%_EXECJAVA% %JAVA_OPTS% %GERONIMO_OPTS% -Dorg.apache.geronimo.base.dir="%GERONIMO_BASE%" -Djava.io.tmpdir="%GERONIMO_TMPDIR%" -jar %_JARFILE% %_LONG_OPT% %CMD_LINE_ARGS%
goto end
:doJDB
%_EXECJAVA% %JAVA_OPTS% %GERONIMO_OPTS% -sourcepath "%JDB_SRCPATH%" -Dorg.apache.geronimo.base.dir="%GERONIMO_BASE%" -Djava.io.tmpdir="%GERONIMO_TMPDIR%" -classpath %_JARFILE% %MAINCLASS% %CMD_LINE_ARGS%
-goto end
-
-:doJpda
-%_EXECJAVA% %JAVA_OPTS% %GERONIMO_OPTS% -Xdebug -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=n %DEBUG_OPTS% -Dorg.apache.geronimo.base.dir="%GERONIMO_BASE%" -Djava.io.tmpdir="%GERONIMO_TMPDIR%" -jar %_JARFILE% %_LONG_OPT% %CMD_LINE_ARGS%
goto end
:end
Modified: geronimo/trunk/modules/scripts/src/resources/bin/geronimo.sh
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/scripts/src/resources/bin/geronimo.sh?rev=386232&r1=386231&r2=386232&view=diff
==============================================================================
--- geronimo/trunk/modules/scripts/src/resources/bin/geronimo.sh (original)
+++ geronimo/trunk/modules/scripts/src/resources/bin/geronimo.sh Wed Mar 15 16:59:04 2006
@@ -81,11 +81,22 @@
# when the "debug" command is executed.
# Defaults to %GERONIMO_HOME%\src
#
+# JPDA_ADDRESS (Optional) Java runtime options used when the "jpda start"
+# command is executed. The default is 8000.
+#
# JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start"
# command is executed. The default is "dt_socket".
#
-# JPDA_ADDRESS (Optional) Java runtime options used when the "jpda start"
-# command is executed. The default is 8000.
+# JPDA_OPTS (Optional) JPDA command line options.
+# Only set this if you need to use some unusual JPDA
+# command line options. This overrides the use of the
+# other JPDA_* environment variables.
+# Defaults to JPDA command line options contructed from
+# the JPDA_ADDRESS, JPDA_SUSPEND and JPDA_TRANSPORT
+# environment variables.
+#
+# JPDA_SUSPEND (Optional) Suspend the JVM before the main class is loaded.
+# Valid values are 'y' and 'n'. The default is "n".
#
# START_OS_CMD (Optional) Operating system command that will be placed in
# front of the java command when starting Geronimo in the
@@ -246,6 +257,9 @@
fi
if [ "$1" = "jpda" ] ; then
+ if [ -z "$JPDA_SUSPEND" ]; then
+ JPDA_SUSPEND="n"
+ fi
if [ -z "$JPDA_TRANSPORT" ]; then
JPDA_TRANSPORT="dt_socket"
fi
@@ -253,9 +267,11 @@
JPDA_ADDRESS="8000"
fi
if [ -z "$JPDA_OPTS" ]; then
- JPDA_OPTS="-Xdebug -Xrunjdwp:transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=n"
+ JPDA_OPTS="-Xdebug -Xrunjdwp:transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND"
fi
- LONG_OPT=--long
+ if [ "$GERONIMO_ENV_INFO" != "off" ] ; then
+ echo "Using JPDA_OPTS: $JPDA_OPTS"
+ fi
GERONIMO_OPTS="$GERONIMO_OPTS $JPDA_OPTS"
shift
fi