Author: violetagg
Date: Mon Nov  7 14:49:36 2016
New Revision: 1768520

URL: http://svn.apache.org/viewvc?rev=1768520&view=rev
Log:
Allow customization of service.bat, such as heap memory size, service startup 
mode and JVM args. Patch provided by isapir via Github. This closes #36

Modified:
    tomcat/trunk/bin/service.bat
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/bin/service.bat
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/bin/service.bat?rev=1768520&r1=1768519&r2=1768520&view=diff
==============================================================================
--- tomcat/trunk/bin/service.bat (original)
+++ tomcat/trunk/bin/service.bat Mon Nov  7 14:49:36 2016
@@ -142,6 +142,10 @@ echo Using JVM:              "%JVM%"
 set 
"CLASSPATH=%CATALINA_HOME%\bin\bootstrap.jar;%CATALINA_BASE%\bin\tomcat-juli.jar"
 if not "%CATALINA_HOME%" == "%CATALINA_BASE%" set 
"CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\tomcat-juli.jar"
 
+if "%SERVICE_STARTUP_MODE%" == "" set SERVICE_STARTUP_MODE=manual
+if "%JvmMs%" == "" set JvmMs=128
+if "%JvmMx%" == "" set JvmMx=256
+
 "%EXECUTABLE%" //IS//%SERVICE_NAME% ^
     --Description "Apache Tomcat @VERSION@ Server - http://tomcat.apache.org/"; 
^
     --DisplayName "%DISPLAYNAME%" ^
@@ -159,9 +163,10 @@ if not "%CATALINA_HOME%" == "%CATALINA_B
     --StopClass org.apache.catalina.startup.Bootstrap ^
     --StartParams start ^
     --StopParams stop ^
-    --JvmOptions 
"-Dcatalina.home=%CATALINA_HOME%;-Dcatalina.base=%CATALINA_BASE%;-Djava.io.tmpdir=%CATALINA_BASE%\temp;-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager;-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties"
 ^
-    --JvmMs 128 ^
-    --JvmMx 256
+    --JvmOptions 
"-Dcatalina.home=%CATALINA_HOME%;-Dcatalina.base=%CATALINA_BASE%;-Djava.io.tmpdir=%CATALINA_BASE%\temp;-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager;-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties;%JvmArgs%"
 ^
+    --Startup "%SERVICE_STARTUP_MODE%" ^
+    --JvmMs "%JvmMs%" ^
+    --JvmMx "%JvmMx%"
 if not errorlevel 1 goto installed
 echo Failed installing '%SERVICE_NAME%' service
 goto end

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1768520&r1=1768519&r2=1768520&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon Nov  7 14:49:36 2016
@@ -54,6 +54,15 @@
       </update>
     </changelog>
   </subsection>
+  <subsection name="Other">
+    <changelog>
+      <fix>
+        Allow customization of service.bat, such as heap memory size, service
+        startup mode and JVM args. Patch provided by isapir via Github.
+        (violetagg)
+      </fix>
+    </changelog>
+  </subsection>
 </section>
 <section name="Tomcat 9.0.0.M13" rtext="release in progress">
   <subsection name="Coyote">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to