Skip to content

Commit

Permalink
UBI9: Different java options script paths
Browse files Browse the repository at this point in the history
  • Loading branch information
jfdenise committed Aug 27, 2024
1 parent b27902d commit 92e05e7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ JAVA_INITIAL_MEM_RATIO=${JAVA_INITIAL_MEM_RATIO:-${INITIAL_HEAP_PERCENT:+$(echo

function source_java_run_scripts() {
local java_scripts_dir="/opt/run-java"
if [ -f "${JBOSS_CONTAINER_JAVA_JVM_MODULE}/java-default-options" ]; then
java_scripts_dir="${JBOSS_CONTAINER_JAVA_JVM_MODULE}"
fi
# load java options functions
source "${java_scripts_dir}/java-default-options"
}
Expand Down Expand Up @@ -38,6 +41,9 @@ adjust_java_options() {
local options="$@"
local remove_xms
local java_scripts_dir="/opt/run-java"
if [ -f "${JBOSS_CONTAINER_JAVA_JVM_MODULE}/java-default-options" ]; then
java_scripts_dir="${JBOSS_CONTAINER_JAVA_JVM_MODULE}"
fi
# nuke any hard-coded memory settings. java-default-options won't add these
# if they're already specified
JAVA_OPTS="$(echo $JAVA_OPTS| sed -re 's/(-Xmx[^ ]*|-Xms[^ ]*)//g')"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ fi
JAVA_OPTS="$JAVA_OPTS $JAVA_OPTS_APPEND"

#Handle proxy options
source /opt/run-java/proxy-options
if [ -f "${JBOSS_CONTAINER_JAVA_PROXY_MODULE}/proxy-options" ]; then
source "${JBOSS_CONTAINER_JAVA_PROXY_MODULE}"/proxy-options
else
source /opt/run-java/proxy-options
fi
eval preConfigure
eval configure

Expand Down

0 comments on commit 92e05e7

Please sign in to comment.