You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/07/24 21:13:28 UTC
[tomcat] 07/08: Allow customization of service.bat,
startup mode and JVM args. (isapir)
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 637b0f258583a65f747648b1c2423f9c1baa2585
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Jul 24 18:28:28 2019 +0100
Allow customization of service.bat, startup mode and JVM args. (isapir)
---
bin/service.bat | 11 ++++++++---
webapps/docs/changelog.xml | 4 ++++
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/bin/service.bat b/bin/service.bat
index 6d8a04e..221ef18 100755
--- a/bin/service.bat
+++ b/bin/service.bat
@@ -159,6 +159,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 - https://tomcat.apache.org/" ^
--DisplayName "%DISPLAYNAME%" ^
@@ -176,10 +180,11 @@ if not "%CATALINA_HOME%" == "%CATALINA_BASE%" set "CLASSPATH=%CLASSPATH%;%CATALI
--StopClass org.apache.catalina.startup.Bootstrap ^
--StartParams start ^
--StopParams stop ^
- --JvmOptions "-Dcatalina.home=%CATALINA_HOME%;-Dcatalina.base=%CATALINA_BASE%;-D%ENDORSED_PROP%=%CATALINA_HOME%\endorsed;-Djava.io.tmpdir=%CATALINA_BASE%\temp;-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager;-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties" ^
+ --JvmOptions "-Dcatalina.home=%CATALINA_HOME%;-Dcatalina.base=%CATALINA_BASE%;-D%ENDORSED_PROP%=%CATALINA_HOME%\endorsed;-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%" ^
--JvmOptions9 "--add-opens=java.base/java.lang=ALL-UNNAMED#--add-opens=java.base/java.io=ALL-UNNAMED#--add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED" ^
- --JvmMs 128 ^
- --JvmMx 256
+ --Startup "%SERVICE_STARTUP_MODE%" ^
+ --JvmMs "%JvmMs%" ^
+ --JvmMx "%JvmMx%"
if not errorlevel 1 goto installed
echo Failed installing '%SERVICE_NAME%' service
goto end
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index a04f144..7640b0b 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -86,6 +86,10 @@
may be overridden by setting <code>UMASK</code> in
<code>setenv.sh</code>. (markt)
</update>
+ <fix>
+ Allow customization of service.bat, such as heap memory size, service
+ startup mode and JVM args. (isapir)
+ </fix>
</changelog>
</subsection>
</section>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org