ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [30/37] incubator-ignite git commit: GG-10501: Fixed.
Date Tue, 07 Jul 2015 06:31:42 GMT
GG-10501: Fixed.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/2acacd98
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/2acacd98
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/2acacd98

Branch: refs/heads/ignite-901
Commit: 2acacd98c99210ac97ac2841f37268348e55c946
Parents: f72b291
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Mon Jul 6 12:30:36 2015 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Mon Jul 6 12:30:36 2015 +0300

----------------------------------------------------------------------
 .../internal/interop/InteropIgnition.java       | 31 +++++++++++++-------
 1 file changed, 20 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2acacd98/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropIgnition.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropIgnition.java
b/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropIgnition.java
index fb0d6e1..2989a17 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropIgnition.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropIgnition.java
@@ -50,24 +50,33 @@ public class InteropIgnition {
      */
     public static synchronized InteropProcessor start(@Nullable String springCfgPath, @Nullable
String gridName,
         int factoryId, long envPtr, long dataPtr) {
-        IgniteConfiguration cfg = configuration(springCfgPath);
+        ClassLoader oldClsLdr = Thread.currentThread().getContextClassLoader();
 
-        if (gridName != null)
-            cfg.setGridName(gridName);
-        else
-            gridName = cfg.getGridName();
+        Thread.currentThread().setContextClassLoader(InteropIgnition.class.getClassLoader());
+
+        try {
+            IgniteConfiguration cfg = configuration(springCfgPath);
 
-        InteropBootstrap bootstrap = bootstrap(factoryId);
+            if (gridName != null)
+                cfg.setGridName(gridName);
+            else
+                gridName = cfg.getGridName();
 
-        InteropProcessor proc = bootstrap.start(cfg, envPtr, dataPtr);
+            InteropBootstrap bootstrap = bootstrap(factoryId);
 
-        trackFinalization(proc);
+            InteropProcessor proc = bootstrap.start(cfg, envPtr, dataPtr);
 
-        InteropProcessor old = instances.put(gridName, proc);
+            trackFinalization(proc);
 
-        assert old == null;
+            InteropProcessor old = instances.put(gridName, proc);
 
-        return proc;
+            assert old == null;
+
+            return proc;
+        }
+        finally {
+            Thread.currentThread().setContextClassLoader(oldClsLdr);
+        }
     }
 
     /**


Mime
View raw message