ARTEMIS-263 - added etc folder to runtime

https://issues.apache.org/jira/browse/ARTEMIS-263
This commit is contained in:
Andy Taylor 2015-10-19 11:09:52 +01:00
parent b0b567bc83
commit 2ea977db2d
1 changed files with 12 additions and 7 deletions

View File

@ -63,6 +63,18 @@ public class Artemis {
ArrayList<URL> urls = new ArrayList<URL>(); 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) { for (File bootdir : dirs) {
if (bootdir.exists() && bootdir.isDirectory()) { if (bootdir.exists() && bootdir.isDirectory()) {
@ -98,13 +110,6 @@ public class Artemis {
System.setProperty("logging.configuration", fixupFileURI(loggingConfig)); 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(); ClassLoader originalCL = Thread.currentThread().getContextClassLoader();
// Now setup our classloader.. // Now setup our classloader..