From 8b06047bb9c6b979d359e359d43d705a4a49d749 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Thu, 21 Aug 2014 22:19:21 +0800 Subject: [PATCH] IDEMPIERE-2163 Hazelcast: Context class loader. Set context class loader for hazelcast instance. --- .../src/org/idempiere/hazelcast/service/Activator.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/org.idempiere.hazelcast.service/src/org/idempiere/hazelcast/service/Activator.java b/org.idempiere.hazelcast.service/src/org/idempiere/hazelcast/service/Activator.java index d3e0f222e3..b644e7b80b 100644 --- a/org.idempiere.hazelcast.service/src/org/idempiere/hazelcast/service/Activator.java +++ b/org.idempiere.hazelcast.service/src/org/idempiere/hazelcast/service/Activator.java @@ -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); } }); }