ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [37/50] [abbrv] incubator-ignite git commit: # IGNITE-45 Fixed missing pool shutdown.
Date Tue, 24 Mar 2015 09:02:50 GMT
# IGNITE-45 Fixed missing pool shutdown.


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

Branch: refs/heads/ignite-45-gridcache
Commit: d5cfe33529b8bf30c07cb0358a9214f549ee2785
Parents: 9607738
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Tue Mar 24 12:11:32 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Tue Mar 24 12:11:32 2015 +0700

----------------------------------------------------------------------
 .../ignite/cache/store/jdbc/CacheAbstractJdbcStore.java       | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d5cfe335/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java
b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java
index 80e3e3c..b6485f0 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java
@@ -613,8 +613,10 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K,
V>,
     /** {@inheritDoc} */
     @Override public void loadCache(final IgniteBiInClosure<K, V> clo, @Nullable Object...
args)
         throws CacheLoaderException {
+        ExecutorService pool = null;
+
         try {
-            ExecutorService pool = Executors.newFixedThreadPool(maxPoolSz);
+            pool = Executors.newFixedThreadPool(maxPoolSz);
 
             Collection<Future<?>> futs = new ArrayList<>();
 
@@ -700,6 +702,9 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K,
V>,
         catch (IgniteCheckedException e) {
             throw new CacheLoaderException("Failed to load cache", e.getCause());
         }
+        finally {
+            U.shutdownNow(getClass(), pool, log);
+        }
     }
 
     /** {@inheritDoc} */


Mime
View raw message