Repository: activemq-artemis Updated Branches: refs/heads/master b0b567bc8 -> efce1d7a7
ARTEMIS-263 - added etc folder to runtime https://issues.apache.org/jira/browse/ARTEMIS-263 Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/2ea977db Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/2ea977db Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/2ea977db Branch: refs/heads/master Commit: 2ea977db2d25aef6da2a8bfa96634f74904d63ef Parents: b0b567b Author: Andy Taylor <[email protected]> Authored: Mon Oct 19 11:09:52 2015 +0100 Committer: Andy Taylor <[email protected]> Committed: Mon Oct 19 14:08:06 2015 +0100 ---------------------------------------------------------------------- .../apache/activemq/artemis/boot/Artemis.java | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/2ea977db/artemis-boot/src/main/java/org/apache/activemq/artemis/boot/Artemis.java ---------------------------------------------------------------------- diff --git a/artemis-boot/src/main/java/org/apache/activemq/artemis/boot/Artemis.java b/artemis-boot/src/main/java/org/apache/activemq/artemis/boot/Artemis.java index 4879761..e87c19e 100644 --- a/artemis-boot/src/main/java/org/apache/activemq/artemis/boot/Artemis.java +++ b/artemis-boot/src/main/java/org/apache/activemq/artemis/boot/Artemis.java @@ -63,6 +63,18 @@ public class Artemis { ArrayList<URL> urls = new ArrayList<URL>(); + + // Without the etc on the config, things like JGroups configuration wouldn't be loaded + if (fileInstance != null) { + File etcFile = new File(fileInstance, "etc"); + // Adding etc to the classLoader so modules can lookup for their configs + urls.add(etcFile.toURI().toURL()); + } + if (fileHome != null) { + File etcFile = new File(fileHome, "etc"); + // Adding etc to the classLoader so modules can lookup for their configs + urls.add(etcFile.toURI().toURL()); + } for (File bootdir : dirs) { if (bootdir.exists() && bootdir.isDirectory()) { @@ -98,13 +110,6 @@ public class Artemis { System.setProperty("logging.configuration", fixupFileURI(loggingConfig)); } - // Without the etc on the config, things like JGroups configuration wouldn't be loaded - if (fileInstance != null) { - File etcFile = new File(fileInstance, "etc"); - // Adding etc to the classLoader so modules can lookup for their configs - urls.add(etcFile.toURI().toURL()); - } - ClassLoader originalCL = Thread.currentThread().getContextClassLoader(); // Now setup our classloader..
