From 2ea977db2d25aef6da2a8bfa96634f74904d63ef Mon Sep 17 00:00:00 2001 From: Andy Taylor Date: Mon, 19 Oct 2015 11:09:52 +0100 Subject: [PATCH] ARTEMIS-263 - added etc folder to runtime https://issues.apache.org/jira/browse/ARTEMIS-263 --- .../apache/activemq/artemis/boot/Artemis.java | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) 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 4879761db3..e87c19ec74 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 urls = new ArrayList(); + + // 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..