library/roles/tomcat-multiple-instances: Do not set the Permgen size option if the jdk version is >=8.

This commit is contained in:
Andrea Dell'Amico 2017-01-17 12:46:25 +01:00
parent fc790625d3
commit 3a926d3080
2 changed files with 10 additions and 2 deletions

View File

@ -24,7 +24,7 @@ tomcat_m_restart_timeout: 300
# -server -Djava.awt.headless=true are always used. No need to specify them
tomcat_m_java_opts_heap: "-Xms{{ tomcat_m_min_heap_size }} -Xmx{{ tomcat_m_heap_size }}"
tomcat_m_java_opts_permgen: "-XX:MaxPermSize={{ tomcat_m_permgen_size }}"
tomcat_m_java_opts: "{{ tomcat_m_java_opts_permgen }}"
tomcat_m_java_opts: ""
tomcat_m_java_gc_opts: "-XX:+UseConcMarkSweepGC"
# Use "-XX:+UseConcMarkSweepGC" to enable the CMS garbage collector (improved
# response time). If you use that option and you run Tomcat on a machine with

View File

@ -7,8 +7,16 @@ JAVA_HEAP="{{ item.java_heap }}"
{% else %}
JAVA_HEAP="{{ tomcat_m_java_opts_heap }}"
{% endif %}
JAVA_PERMGEN=
{% if jdk_default <= 7 %}
{% if item.java_permgen_size is defined %}
JAVA_PERMGEN="-XX:MaxPermSize={{ item.java_permgen_size }}"
{% else %}
JAVA_PERMGEN="-XX:MaxPermSize={{ tomcat_m_permgen_size }}"
{% endif %}
{% endif %}
{% if item.java_opts is defined %}
JAVA_OPTS="{{ item.java_opts }} $JAVA_OPTS $JAVA_HEAP"
JAVA_OPTS="{{ item.java_opts }} $JAVA_OPTS $JAVA_HEAP $JAVA_PERMGEN"
{% endif %}
{% if item.java_gc_opts is defined %}
JAVA_OPTS="{{ item.java_gc_opts }} $JAVA_OPTS"