tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Elkins <chr...@scardini.com>
Subject [PATCH] Allow configurable JPDA transport in catalina.bat
Date Tue, 19 Mar 2002 17:28:29 GMT
Hi, all.

The patch below allows the JPDA transport used in "jpda start" to be set via
an environment variable. Unfortunately, not all debuggers support the shared
memory transport (e.g., JSwat), so these changes make it possible to use
the socket transport without having to modify catalina.bat locally.

Moreover, this patch cleans up the slightly inaccurate comment for
JPDA_ADDRESS and includes my previous patch to fix a typo (with the subject
"[PATCH] Typo in catalina.bat").

-- 
Christopher Elkins


Index: catalina.bat
===================================================================
RCS file: /home/cvspublic/jakarta-tomcat-4.0/catalina/src/bin/catalina.bat,v
retrieving revision 1.25
diff -u -r1.25 catalina.bat
--- catalina.bat	11 Feb 2002 20:26:24 -0000	1.25
+++ catalina.bat	19 Mar 2002 17:20:17 -0000
@@ -27,7 +27,10 @@
 rem                   (JSSE) installation, whose JAR files will be added to the
 rem                   system class path used to start Tomcat.
 rem
-rem   JPDA_ADDRESS    (Optional) Java runtime options used when the "jpda start"
+rem   JPDA_TRANSPORT  (Optional) JPDA transport used when the "jpda start"
+rem                   command is executed. The default is "dt_shmem".
+rem
+rem   JPDA_ADDRESS    (Optional) JPDA address used when the "jpda start"
 rem                   command is executed. The default is "jdbconn".
 rem
 rem $Id: catalina.bat,v 1.25 2002/02/11 20:26:24 patrickl Exp $
@@ -87,7 +90,10 @@
 
 if not ""%1"" == ""jpda"" goto noJpda
 set JPDA=jpda
-if not "%JPDA_ADDRESS%" == "" got gotJpdaAddress
+if not "%JPDA_TRANSPORT%" == "" goto gotJpdaTransport
+set JPDA_TRANSPORT=dt_shmem
+:gotJpdaTransport
+if not "%JPDA_ADDRESS%" == "" goto gotJpdaAddress
 set JPDA_ADDRESS=jdbconn
 :gotJpdaAddress
 shift
@@ -174,10 +180,10 @@
 goto end
 :doJpda
 if not "%SECURITY_POLICY_FILE%" == "" goto doSecurityJpda
-%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% -Xdebug -Xrunjdwp:transport=dt_shmem,address=%JPDA_ADDRESS%,server=y,suspend=n
%DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%"
-Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS%
%ACTION%
+%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% -Xdebug -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=n
%DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%"
-Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS%
%ACTION%
 goto end
 :doSecurityJpda
-%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% -Xrunjdwp:transport=dt_shmem,address="%JPDA_ADDRESS%",server=y,suspend=n
%DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager
-Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%"
-Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
+%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% -Xrunjdwp:transport=%JPDA_TRANSPORT%,address="%JPDA_ADDRESS%",server=y,suspend=n
%DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager
-Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%"
-Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
 goto end
 
 :end

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message