You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vk...@apache.org on 2015/09/04 21:41:31 UTC

[06/19] ignite git commit: IGNITE-884 - Spring autowiring

IGNITE-884 - Spring autowiring


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

Branch: refs/heads/ignite-884
Commit: edc42c42760166a114b88699ceadd21cef13a3ad
Parents: 3fa3a54
Author: Valentin Kulichenko <vk...@gridgain.com>
Authored: Tue Jun 16 16:39:59 2015 -0700
Committer: Valentin Kulichenko <vk...@gridgain.com>
Committed: Tue Jun 16 16:39:59 2015 -0700

----------------------------------------------------------------------
 .../internal/processors/cache/GridCacheProcessor.java  | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/edc42c42/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index 8b78d12..a86738f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -1080,6 +1080,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
     {
         assert cfg != null;
 
+        // TODO: IGNITE-884 - Prepare all factories.
         prepare(cfg, cfg.getCacheStoreFactory(), false);
 
         CacheStartContext startCtx = startCtxs.remove(maskNull(cfg.getName()));
@@ -1983,7 +1984,17 @@ public class GridCacheProcessor extends GridProcessorAdapter {
 
         req.cacheType(cacheType);
 
-        startCtxs.putIfAbsent(maskNull(cacheName), new CacheStartContext(ctx, req.startCacheConfiguration()));
+        CacheConfiguration cfg = req.startCacheConfiguration();
+
+        try {
+            // TODO: IGNITE-884 - Prepare all factories.
+            prepare(cfg, cfg.getCacheStoreFactory(), false);
+        }
+        catch (IgniteCheckedException e) {
+            return new GridFinishedFuture<>(e);
+        }
+
+        startCtxs.putIfAbsent(maskNull(cacheName), new CacheStartContext(ctx, cfg));
 
         return F.first(initiateCacheChanges(F.asList(req), failIfExists));
     }