From f4f2f4eedad020427f5414e213130402cc3159af Mon Sep 17 00:00:00 2001 From: Alexander Domke Date: Wed, 12 May 2021 12:54:14 +0200 Subject: [PATCH] ARTEMIS-3300 Evaluation of the system property artmis.data in the OSGi environment in addition to karaf.data --- .../apache/activemq/artemis/osgi/OsgiBroker.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/artemis-server-osgi/src/main/java/org/apache/activemq/artemis/osgi/OsgiBroker.java b/artemis-server-osgi/src/main/java/org/apache/activemq/artemis/osgi/OsgiBroker.java index 85934691b3..8982862b50 100644 --- a/artemis-server-osgi/src/main/java/org/apache/activemq/artemis/osgi/OsgiBroker.java +++ b/artemis-server-osgi/src/main/java/org/apache/activemq/artemis/osgi/OsgiBroker.java @@ -75,10 +75,17 @@ public class OsgiBroker { security.setRolePrincipalClass(rolePrincipalClass); } String brokerInstance = null; - String karafDataDir = System.getProperty("karaf.data"); - if (karafDataDir != null) { - brokerInstance = karafDataDir + "/artemis/" + name; - } + + String artemisDataDir = System.getProperty("artemis.data"); + if (artemisDataDir != null) { + brokerInstance = artemisDataDir + "/artemis/" + name; + } else { + String karafDataDir = System.getProperty("karaf.data"); + if (karafDataDir != null) { + brokerInstance = karafDataDir + "/artemis/" + name; + } + } + // todo if we start to pullout more configs from the main config then we // should pull out the configuration objects from factories if available