voxpupuli / puppet-wildfly

Puppet module to install, configure and manage Wildfly (8/9/10+), JBoss EAP (6.1+/7.0+) and some Wildfly based products like apiman, Keycloak and Infinispan.
Apache License 2.0
29 stars 78 forks source link

Replace MaxPermSize with MaxMetaspaceSize in domain.conf template #288

Closed EmersonPrado closed 1 year ago

EmersonPrado commented 1 year ago

According to official Oracle Java docs, Java option MaxPermSize was deprecated in Java 8 and removed in Java 17. Since Java 8, this option was superseded by MaxMetaspaceSize. This seems to require two changes:

  1. domain.conf.epp template should include the correct one in line JAVA_OPTS="-Xms<%= $wildfly::java_xms %> -Xmx<%= $wildfly::java_xmx %>"
  2. The classes that use this template should accept both parameters and validate them against Java version.
EmersonPrado commented 1 year ago

I learned that this module can't know Java version - the obvious reason being Java is managed elsewhere - so it can't choose parameter according to that. I changed the title to use only MaxMetaspaceSize instead. @biemond Adding MaxMetaspaceSize breaks compatibility with Oracle Java < 8. But Java < 8 is not supported anymore. Is that OK?