IDEMPIERE-2163 Hazelcast: Context class loader. Set context class loader for hazelcast instance.

This commit is contained in:
Heng Sin Low 2014-08-21 22:19:21 +08:00
parent f2b32d505a
commit 8b06047bb9
1 changed files with 4 additions and 1 deletions

View File

@ -110,11 +110,14 @@ public class Activator implements BundleActivator {
if (file != null && file.exists()) {
try {
Config config = new FileSystemXmlConfig(file);
config.setClassLoader(getClass().getClassLoader());
hazelcastInstance = Hazelcast.newHazelcastInstance(config);
return;
} catch (FileNotFoundException e) {}
}
hazelcastInstance = Hazelcast.newHazelcastInstance(null);
Config config = new Config();
config.setClassLoader(getClass().getClassLoader());
hazelcastInstance = Hazelcast.newHazelcastInstance(config);
}
});
}