This commit is contained in:
Martyn Taylor 2015-10-19 15:03:23 +01:00
commit efce1d7a71
1 changed files with 12 additions and 7 deletions

View File

@ -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..