How to define JAVA_OPTS for multiple standalone JVMs

Latest response

We are running JBoss EAP 7.4.3 on RHEL 8.5 in standalone mode. We have over 50 JVMs. There are Java options that are common to all the JVMs and then there are ones specific to a JVM. We are looking for recommendations that allow us to have a single entity where all the common options are defined and then an entity for each JVM that has specific options. We have explored using EnvironmentFile entries in systemctl, but defining one variable based on another does not work because variable expansion is not supported in the EnvironmentFile. So we cannot use JBOSS_HOME=/usr/share/jboss-as, JBOSS_NAME=app_standalone and JBOSS_BASE_DIR=$JBOSS_HOME/$JBOSS_NAME. We are not tied to staying with our EnvironmentFile approach and are interested in reading how other organizations handle this? Thank-you in advance for your time.


we are using a domain configuration where we have the default JVM configured and were a single JVM option is different then this is change in the Servers JVM.