BZ 42951: Port r454193 (BZ 36976) from TC 5.5.x:
authorrjung <rjung@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 22 Jul 2007 18:29:59 +0000 (18:29 +0000)
committerrjung <rjung@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 22 Jul 2007 18:29:59 +0000 (18:29 +0000)
Don't use CATALINA_OPTS when stopping Tomcat.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@558522 13f79535-47bb-0310-9956-ffa450edef68

bin/catalina.bat
bin/catalina.sh
webapps/docs/changelog.xml

index 9810e5e..d473476 100644 (file)
@@ -12,7 +12,7 @@ rem                   of a Catalina installation.  If not present, resolves to
 rem                   the same directory that CATALINA_HOME points to.
 rem
 rem   CATALINA_OPTS   (Optional) Java runtime options used when the "start",
-rem                   "stop", or "run" command is executed.
+rem                   or "run" command is executed.
 rem
 rem   CATALINA_TMPDIR (Optional) Directory path location of temporary directory
 rem                   the JVM should use (java.io.tmpdir).  Defaults to
@@ -188,6 +188,7 @@ goto execCmd
 :doStop
 shift
 set ACTION=stop
+set CATALINA_OPTS=
 goto execCmd
 
 :doVersion
index b447eb6..70afbbd 100755 (executable)
@@ -11,7 +11,7 @@
 #                   the same directory that CATALINA_HOME points to.
 #
 #   CATALINA_OPTS   (Optional) Java runtime options used when the "start",
-#                   "stop", or "run" command is executed.
+#                   or "run" command is executed.
 #
 #   CATALINA_TMPDIR (Optional) Directory path location of temporary directory
 #                   the JVM should use (java.io.tmpdir).  Defaults to
@@ -292,7 +292,7 @@ elif [ "$1" = "stop" ] ; then
     FORCE=1
   fi
 
-  "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
+  "$_RUNJAVA" $JAVA_OPTS \
     -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
     -Dcatalina.base="$CATALINA_BASE" \
     -Dcatalina.home="$CATALINA_HOME" \
index 298df62..27bbfde 100644 (file)
     <author email="remm@apache.org">Remy Maucherat</author>
     <author email="yoavs@apache.org">Yoav Shapira</author>
     <author email="fhanik@apache.org">Filip Hanik</author>
+    <author email="rjung@apache.org">Rainer Jung</author>
     <title>Changelog</title>
   </properties>
 
 <body>
+<section name="Tomcat 6.0.15 (remm)">
+  <subsection name="Catalina">
+    <changelog>
+      <fix>
+         <bug>42951</bug>: Don't use CATALINA_OPTS when stopping Tomcat. This
+         allows options for starting and stopping to be set on JAVA_OPTS and
+         options for starting only to be set on CATALINA_OPTS. Without this
+         fix, some startup options (eg the port for remote JMX) would cause
+         stop to fail. Based on a fix suggested by Michael Vorburger.
+         Port of r454193 (<bug>36976</bug>) from Tomcat 5.5.x. (markt,rjung)
+      </fix>
+    </changelog>
+  </subsection>
+</section>
 <section name="Tomcat 6.0.14 (remm)">
   <subsection name="General">
     <changelog>