[07/50] [abbrv] ignite git commit: Ignite-2087 (cherry picked from commit bd1f506)

2016-01-11 Thread sboikov
Ignite-2087
(cherry picked from commit bd1f506)


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

Branch: refs/heads/ignite-961
Commit: 11bee91787dd3d6f2a57739e26622e55428f3b1c
Parents: c3fe967
Author: Anton Vinogradov 
Authored: Thu Dec 17 14:27:16 2015 +0300
Committer: Anton Vinogradov 
Committed: Thu Dec 17 14:30:32 2015 +0300

--
 .../org/apache/ignite/cache/CacheManager.java   |  2 +-
 .../org/apache/ignite/internal/IgnitionEx.java  | 51 +++-
 .../java/org/apache/ignite/IgniteSpring.java|  4 +-
 3 files changed, 43 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/11bee917/modules/core/src/main/java/org/apache/ignite/cache/CacheManager.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/cache/CacheManager.java 
b/modules/core/src/main/java/org/apache/ignite/cache/CacheManager.java
index 84ed2cd..6e09d72 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/CacheManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/CacheManager.java
@@ -114,7 +114,7 @@ public class CacheManager implements 
javax.cache.CacheManager {
 ignite = (IgniteKernal)IgnitionEx.start(cfg);
 }
 else
-ignite = (IgniteKernal)IgnitionEx.start(uri.toURL());
+ignite = (IgniteKernal)IgnitionEx.start(uri.toURL(), clsLdr);
 
 kernalGateway = ignite.context().gateway();
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/11bee917/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java 
b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
index 4f6c6d9..5153fb3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
@@ -495,7 +495,7 @@ public class IgnitionEx {
 URL url = U.resolveIgniteUrl(DFLT_CFG);
 
 if (url != null)
-return start(DFLT_CFG, null, springCtx);
+return start(DFLT_CFG, null, springCtx, null);
 
 U.warn(null, "Default Spring XML file not found (is IGNITE_HOME set?): 
" + DFLT_CFG);
 
@@ -581,7 +581,7 @@ public class IgnitionEx {
 return start(cfg);
 }
 else
-return start(springCfgPath, gridName, null);
+return start(springCfgPath, gridName, null, null);
 }
 
 /**
@@ -697,6 +697,7 @@ public class IgnitionEx {
  * @param springCfgPath Spring XML configuration file path or URL. This 
cannot be {@code null}.
  * @param gridName Grid name that will override default.
  * @param springCtx Optional Spring application context, possibly {@code 
null}.
+ * @param ldr Optional class loader that will be used by default.
  *  Spring bean definitions for bean injection are taken from this 
context.
  *  If provided, this context can be injected into grid tasks and grid 
jobs using
  *  {@link SpringApplicationContextResource 
@SpringApplicationContextResource} annotation.
@@ -707,10 +708,10 @@ public class IgnitionEx {
  *  been started or Spring XML configuration file is invalid.
  */
 public static Ignite start(String springCfgPath, @Nullable String gridName,
-@Nullable GridSpringResourceContext springCtx) throws 
IgniteCheckedException {
+@Nullable GridSpringResourceContext springCtx, @Nullable ClassLoader 
ldr) throws IgniteCheckedException {
 URL url = U.resolveSpringUrl(springCfgPath);
 
-return start(url, gridName, springCtx);
+return start(url, gridName, springCtx, ldr);
 }
 
 /**
@@ -730,7 +731,28 @@ public class IgnitionEx {
  *  been started or Spring XML configuration file is invalid.
  */
 public static Ignite start(URL springCfgUrl) throws IgniteCheckedException 
{
-return start(springCfgUrl, null, null);
+return start(springCfgUrl, null, null, null);
+}
+
+/**
+ * Starts all grids specified within given Spring XML configuration file 
URL. If grid with given name
+ * is already started, then exception is thrown. In this case all 
instances that may
+ * have been started so far will be stopped too.
+ * 
+ * Usually Spring XML configuration file will contain only one Grid 
definition. Note that
+ * Grid configuration bean(s) is retrieved 

[07/50] [abbrv] ignite git commit: Ignite-2087 (cherry picked from commit bd1f506)

2016-01-10 Thread sboikov
Ignite-2087
(cherry picked from commit bd1f506)


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

Branch: refs/heads/ignite-1537
Commit: 11bee91787dd3d6f2a57739e26622e55428f3b1c
Parents: c3fe967
Author: Anton Vinogradov 
Authored: Thu Dec 17 14:27:16 2015 +0300
Committer: Anton Vinogradov 
Committed: Thu Dec 17 14:30:32 2015 +0300

--
 .../org/apache/ignite/cache/CacheManager.java   |  2 +-
 .../org/apache/ignite/internal/IgnitionEx.java  | 51 +++-
 .../java/org/apache/ignite/IgniteSpring.java|  4 +-
 3 files changed, 43 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/11bee917/modules/core/src/main/java/org/apache/ignite/cache/CacheManager.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/cache/CacheManager.java 
b/modules/core/src/main/java/org/apache/ignite/cache/CacheManager.java
index 84ed2cd..6e09d72 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/CacheManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/CacheManager.java
@@ -114,7 +114,7 @@ public class CacheManager implements 
javax.cache.CacheManager {
 ignite = (IgniteKernal)IgnitionEx.start(cfg);
 }
 else
-ignite = (IgniteKernal)IgnitionEx.start(uri.toURL());
+ignite = (IgniteKernal)IgnitionEx.start(uri.toURL(), clsLdr);
 
 kernalGateway = ignite.context().gateway();
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/11bee917/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java 
b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
index 4f6c6d9..5153fb3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
@@ -495,7 +495,7 @@ public class IgnitionEx {
 URL url = U.resolveIgniteUrl(DFLT_CFG);
 
 if (url != null)
-return start(DFLT_CFG, null, springCtx);
+return start(DFLT_CFG, null, springCtx, null);
 
 U.warn(null, "Default Spring XML file not found (is IGNITE_HOME set?): 
" + DFLT_CFG);
 
@@ -581,7 +581,7 @@ public class IgnitionEx {
 return start(cfg);
 }
 else
-return start(springCfgPath, gridName, null);
+return start(springCfgPath, gridName, null, null);
 }
 
 /**
@@ -697,6 +697,7 @@ public class IgnitionEx {
  * @param springCfgPath Spring XML configuration file path or URL. This 
cannot be {@code null}.
  * @param gridName Grid name that will override default.
  * @param springCtx Optional Spring application context, possibly {@code 
null}.
+ * @param ldr Optional class loader that will be used by default.
  *  Spring bean definitions for bean injection are taken from this 
context.
  *  If provided, this context can be injected into grid tasks and grid 
jobs using
  *  {@link SpringApplicationContextResource 
@SpringApplicationContextResource} annotation.
@@ -707,10 +708,10 @@ public class IgnitionEx {
  *  been started or Spring XML configuration file is invalid.
  */
 public static Ignite start(String springCfgPath, @Nullable String gridName,
-@Nullable GridSpringResourceContext springCtx) throws 
IgniteCheckedException {
+@Nullable GridSpringResourceContext springCtx, @Nullable ClassLoader 
ldr) throws IgniteCheckedException {
 URL url = U.resolveSpringUrl(springCfgPath);
 
-return start(url, gridName, springCtx);
+return start(url, gridName, springCtx, ldr);
 }
 
 /**
@@ -730,7 +731,28 @@ public class IgnitionEx {
  *  been started or Spring XML configuration file is invalid.
  */
 public static Ignite start(URL springCfgUrl) throws IgniteCheckedException 
{
-return start(springCfgUrl, null, null);
+return start(springCfgUrl, null, null, null);
+}
+
+/**
+ * Starts all grids specified within given Spring XML configuration file 
URL. If grid with given name
+ * is already started, then exception is thrown. In this case all 
instances that may
+ * have been started so far will be stopped too.
+ * 
+ * Usually Spring XML configuration file will contain only one Grid 
definition. Note that
+ * Grid configuration bean(s) is 

[07/50] [abbrv] ignite git commit: Ignite-2087 (cherry picked from commit bd1f506)

2016-01-03 Thread vozerov
Ignite-2087
(cherry picked from commit bd1f506)


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

Branch: refs/heads/ignite-2218
Commit: 11bee91787dd3d6f2a57739e26622e55428f3b1c
Parents: c3fe967
Author: Anton Vinogradov 
Authored: Thu Dec 17 14:27:16 2015 +0300
Committer: Anton Vinogradov 
Committed: Thu Dec 17 14:30:32 2015 +0300

--
 .../org/apache/ignite/cache/CacheManager.java   |  2 +-
 .../org/apache/ignite/internal/IgnitionEx.java  | 51 +++-
 .../java/org/apache/ignite/IgniteSpring.java|  4 +-
 3 files changed, 43 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/11bee917/modules/core/src/main/java/org/apache/ignite/cache/CacheManager.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/cache/CacheManager.java 
b/modules/core/src/main/java/org/apache/ignite/cache/CacheManager.java
index 84ed2cd..6e09d72 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/CacheManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/CacheManager.java
@@ -114,7 +114,7 @@ public class CacheManager implements 
javax.cache.CacheManager {
 ignite = (IgniteKernal)IgnitionEx.start(cfg);
 }
 else
-ignite = (IgniteKernal)IgnitionEx.start(uri.toURL());
+ignite = (IgniteKernal)IgnitionEx.start(uri.toURL(), clsLdr);
 
 kernalGateway = ignite.context().gateway();
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/11bee917/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java 
b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
index 4f6c6d9..5153fb3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
@@ -495,7 +495,7 @@ public class IgnitionEx {
 URL url = U.resolveIgniteUrl(DFLT_CFG);
 
 if (url != null)
-return start(DFLT_CFG, null, springCtx);
+return start(DFLT_CFG, null, springCtx, null);
 
 U.warn(null, "Default Spring XML file not found (is IGNITE_HOME set?): 
" + DFLT_CFG);
 
@@ -581,7 +581,7 @@ public class IgnitionEx {
 return start(cfg);
 }
 else
-return start(springCfgPath, gridName, null);
+return start(springCfgPath, gridName, null, null);
 }
 
 /**
@@ -697,6 +697,7 @@ public class IgnitionEx {
  * @param springCfgPath Spring XML configuration file path or URL. This 
cannot be {@code null}.
  * @param gridName Grid name that will override default.
  * @param springCtx Optional Spring application context, possibly {@code 
null}.
+ * @param ldr Optional class loader that will be used by default.
  *  Spring bean definitions for bean injection are taken from this 
context.
  *  If provided, this context can be injected into grid tasks and grid 
jobs using
  *  {@link SpringApplicationContextResource 
@SpringApplicationContextResource} annotation.
@@ -707,10 +708,10 @@ public class IgnitionEx {
  *  been started or Spring XML configuration file is invalid.
  */
 public static Ignite start(String springCfgPath, @Nullable String gridName,
-@Nullable GridSpringResourceContext springCtx) throws 
IgniteCheckedException {
+@Nullable GridSpringResourceContext springCtx, @Nullable ClassLoader 
ldr) throws IgniteCheckedException {
 URL url = U.resolveSpringUrl(springCfgPath);
 
-return start(url, gridName, springCtx);
+return start(url, gridName, springCtx, ldr);
 }
 
 /**
@@ -730,7 +731,28 @@ public class IgnitionEx {
  *  been started or Spring XML configuration file is invalid.
  */
 public static Ignite start(URL springCfgUrl) throws IgniteCheckedException 
{
-return start(springCfgUrl, null, null);
+return start(springCfgUrl, null, null, null);
+}
+
+/**
+ * Starts all grids specified within given Spring XML configuration file 
URL. If grid with given name
+ * is already started, then exception is thrown. In this case all 
instances that may
+ * have been started so far will be stopped too.
+ * 
+ * Usually Spring XML configuration file will contain only one Grid 
definition. Note that
+ * Grid configuration bean(s) is