This is an automated email from the ASF dual-hosted git repository.

jbertram pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/main by this push:
     new f4f2f4e  ARTEMIS-3300 Evaluation of the system property artmis.data in 
the OSGi environment in addition to karaf.data
     new b772c47  This closes #3576
f4f2f4e is described below

commit f4f2f4eedad020427f5414e213130402cc3159af
Author: Alexander Domke <[email protected]>
AuthorDate: Wed May 12 12:54:14 2021 +0200

    ARTEMIS-3300 Evaluation of the system property artmis.data in the OSGi 
environment in addition to karaf.data
---
 .../java/org/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 8593469..8982862 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

Reply via email to