ARTEMIS-3300 Evaluation of the system property artmis.data in the OSGi environment in addition to karaf.data

This commit is contained in:
Alexander Domke 2021-05-12 12:54:14 +02:00 committed by Justin Bertram
parent a95c615317
commit f4f2f4eeda
1 changed files with 11 additions and 4 deletions

View File

@ -75,11 +75,18 @@ public class OsgiBroker {
security.setRolePrincipalClass(rolePrincipalClass); security.setRolePrincipalClass(rolePrincipalClass);
} }
String brokerInstance = null; String brokerInstance = null;
String karafDataDir = System.getProperty("karaf.data");
if (karafDataDir != null) { String artemisDataDir = System.getProperty("artemis.data");
brokerInstance = karafDataDir + "/artemis/" + name; 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 // todo if we start to pullout more configs from the main config then we
// should pull out the configuration objects from factories if available // should pull out the configuration objects from factories if available
FileConfiguration configuration = new FileConfiguration(); FileConfiguration configuration = new FileConfiguration();