Skip to content

Commit 6259320

Browse files
committed
ARTEMIS-5364 clean up profiles
This commit cleans up the various profile files via the following changes: - Remove ARTEMIS_INSTANCE_URI which is no longer used since we moved to Log4j2 - Remove ARTEMIS_INSTANCE_ETC_URI which is not necessary because the jolokia-access.xml can be loaded directly from the classpath - Remove ARTEMIS_OOME_DUMP from the utility profile since it's not used
1 parent 1c2221f commit 6259320

File tree

4 files changed

+4
-26
lines changed

4 files changed

+4
-26
lines changed

artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis-service.xml

+1-3
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
<env name="ARTEMIS_HOME" value="${artemis.home}"/>
2626
<env name="ARTEMIS_INSTANCE" value="@artemis.instance@"/>
2727
<env name="ARTEMIS_INSTANCE_ETC" value="${artemis.instance.etc}"/>
28-
<env name="ARTEMIS_INSTANCE_URI" value="${artemis.instance.uri}"/>
29-
<env name="ARTEMIS_INSTANCE_ETC_URI" value="${artemis.instance.etc.uri}"/>
3028
<env name="ARTEMIS_DATA_DIR" value="${artemis.instance.data}"/>
3129

3230
<logpath>@artemis.instance@\log</logpath>
@@ -56,7 +54,7 @@
5654
<startargument>-Dhawtio.offline="true"</startargument>
5755
<startargument>-Dhawtio.roles=${role}</startargument>
5856
<startargument>-Dhawtio.rolePrincipalClasses=org.apache.activemq.artemis.spi.core.security.jaas.RolePrincipal</startargument>
59-
<startargument>-Djolokia.policyLocation=%ARTEMIS_INSTANCE_ETC_URI%/jolokia-access.xml</startargument>
57+
<startargument>-Djolokia.policyLocation=classpath:jolokia-access.xml</startargument>
6058

6159
<!-- Debug args: Uncomment to enable debug
6260
<startargument>-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005</startargument>

artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/artemis-utility.profile

+1-8
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,9 @@ ARTEMIS_HOME='${artemis.home}'
1919
ARTEMIS_INSTANCE='@artemis.instance@'
2020
ARTEMIS_DATA_DIR='${artemis.instance.data}'
2121
ARTEMIS_ETC_DIR='${artemis.instance.etc}'
22-
ARTEMIS_OOME_DUMP='${artemis.instance.oome.dump}'
23-
24-
# The logging config will need an URI
25-
# this will be encoded in case you use spaces or special characters
26-
# on your directory structure
27-
ARTEMIS_INSTANCE_URI='${artemis.instance.uri}'
28-
ARTEMIS_INSTANCE_ETC_URI='${artemis.instance.etc.uri}'
2922

3023
if [ -z "$LOGGING_ARGS" ]; then
31-
LOGGING_ARGS="-Dlog4j2.configurationFile=${ARTEMIS_INSTANCE_ETC_URI}log4j2-utility.properties"
24+
LOGGING_ARGS="-Dlog4j2.configurationFile=log4j2-utility.properties"
3225
fi
3326

3427
if [ -z "$JAVA_ARGS" ]; then

artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/artemis.profile

+1-7
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ ARTEMIS_DATA_DIR='${artemis.instance.data}'
2121
ARTEMIS_ETC_DIR='${artemis.instance.etc}'
2222
ARTEMIS_OOME_DUMP='${artemis.instance.oome.dump}'
2323

24-
# The logging config will need an URI
25-
# this will be encoded in case you use spaces or special characters
26-
# on your directory structure
27-
ARTEMIS_INSTANCE_URI='${artemis.instance.uri}'
28-
ARTEMIS_INSTANCE_ETC_URI='${artemis.instance.etc.uri}'
29-
3024
# Cluster Properties: Used to pass arguments to ActiveMQ Artemis which can be referenced in broker.xml
3125
#ARTEMIS_CLUSTER_PROPS="-Dactivemq.remoting.default.port=61617 -Dactivemq.remoting.amqp.port=5673 -Dactivemq.remoting.stomp.port=61614 -Dactivemq.remoting.hornetq.port=5446"
3226

@@ -37,7 +31,7 @@ HAWTIO_ROLES='${role}'
3731

3832
# Java Opts
3933
if [ -z "$JAVA_ARGS" ]; then
40-
JAVA_ARGS="-XX:AutoBoxCacheMax=20000 -XX:+PrintClassHistogram -XX:+UseG1GC -XX:+UseStringDeduplication -Xms512M -Xmx${java-memory} -Dhawtio.disableProxy=true -Dhawtio.realm=activemq -Dhawtio.offline=true -Dhawtio.rolePrincipalClasses=org.apache.activemq.artemis.spi.core.security.jaas.RolePrincipal -Dhawtio.http.strictTransportSecurity=max-age=31536000;includeSubDomains;preload -Djolokia.policyLocation=${ARTEMIS_INSTANCE_ETC_URI}jolokia-access.xml -Dlog4j2.disableJmx=true --add-opens java.base/jdk.internal.misc=ALL-UNNAMED ${java-opts}"
34+
JAVA_ARGS="-XX:AutoBoxCacheMax=20000 -XX:+PrintClassHistogram -XX:+UseG1GC -XX:+UseStringDeduplication -Xms512M -Xmx${java-memory} -Dhawtio.disableProxy=true -Dhawtio.realm=activemq -Dhawtio.offline=true -Dhawtio.rolePrincipalClasses=org.apache.activemq.artemis.spi.core.security.jaas.RolePrincipal -Dhawtio.http.strictTransportSecurity=max-age=31536000;includeSubDomains;preload -Djolokia.policyLocation=classpath:jolokia-access.xml -Dlog4j2.disableJmx=true --add-opens java.base/jdk.internal.misc=ALL-UNNAMED ${java-opts}"
4135
fi
4236

4337
# Uncomment to enable logging for Safepoint JVM pauses

artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/artemis.profile.cmd

+1-8
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,11 @@ set ARTEMIS_DATA_DIR="${artemis.instance.data}"
2222
set ARTEMIS_ETC_DIR="${artemis.instance.etc}"
2323
set ARTEMIS_OOME_DUMP="${artemis.instance.oome.dump}"
2424

25-
26-
rem The logging config will need an URI
27-
rem this will be encoded in case you use spaces or special characters
28-
rem on your directory structure
29-
set ARTEMIS_INSTANCE_URI="${artemis.instance.uri.windows}"
30-
set ARTEMIS_INSTANCE_ETC_URI="${artemis.instance.etc.uri.windows}"
31-
3225
rem Cluster Properties: Used to pass arguments to ActiveMQ Artemis which can be referenced in broker.xml
3326
rem set ARTEMIS_CLUSTER_PROPS=-Dactivemq.remoting.default.port=61617 -Dactivemq.remoting.amqp.port=5673 -Dactivemq.remoting.stomp.port=61614 -Dactivemq.remoting.hornetq.port=5446
3427

3528
rem Java Opts
36-
IF "%JAVA_ARGS%"=="" (set JAVA_ARGS=${java-opts} -XX:AutoBoxCacheMax=20000 -XX:+PrintClassHistogram -XX:+UseG1GC -XX:+UseStringDeduplication -Xms512M -Xmx${java-memory} -Djava.security.auth.login.config=%ARTEMIS_ETC_DIR%\login.config -Dhawtio.disableProxy=true -Dhawtio.offline=true -Dhawtio.realm=activemq -Dhawtio.roles=${role} -Dhawtio.rolePrincipalClasses=org.apache.activemq.artemis.spi.core.security.jaas.RolePrincipal -Dhawtio.http.strictTransportSecurity=max-age=31536000;includeSubDomains;preload -Djolokia.policyLocation=%ARTEMIS_INSTANCE_ETC_URI%\jolokia-access.xml -Dartemis.instance=%ARTEMIS_INSTANCE% --add-opens java.base/jdk.internal.misc=ALL-UNNAMED -Dlog4j2.disableJmx=true)
29+
IF "%JAVA_ARGS%"=="" (set JAVA_ARGS=${java-opts} -XX:AutoBoxCacheMax=20000 -XX:+PrintClassHistogram -XX:+UseG1GC -XX:+UseStringDeduplication -Xms512M -Xmx${java-memory} -Djava.security.auth.login.config=%ARTEMIS_ETC_DIR%\login.config -Dhawtio.disableProxy=true -Dhawtio.offline=true -Dhawtio.realm=activemq -Dhawtio.roles=${role} -Dhawtio.rolePrincipalClasses=org.apache.activemq.artemis.spi.core.security.jaas.RolePrincipal -Dhawtio.http.strictTransportSecurity=max-age=31536000;includeSubDomains;preload -Djolokia.policyLocation=classpath:jolokia-access.xml -Dartemis.instance=%ARTEMIS_INSTANCE% --add-opens java.base/jdk.internal.misc=ALL-UNNAMED -Dlog4j2.disableJmx=true)
3730

3831
rem Logs Safepoints JVM pauses: Uncomment to enable them
3932
rem In addition to the traditional GC logs you could enable some JVM flags to know any meaningful and "hidden" pause that could

0 commit comments

Comments
 (0)