ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [02/41] incubator-ignite git commit: IGNITE-35 Removed unnecessary injected resources.
Date Fri, 23 Jan 2015 08:47:37 GMT
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/core/src/main/java/org/gridgain/grid/kernal/processors/resource/GridResourceCustomInjector.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/resource/GridResourceCustomInjector.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/resource/GridResourceCustomInjector.java
index dfd1884..100eaa6 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/resource/GridResourceCustomInjector.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/resource/GridResourceCustomInjector.java
@@ -263,11 +263,6 @@ class GridResourceCustomInjector implements GridResourceInjector {
             // Clean up injected resources.
             cleanup(rsrc, IgniteLoggerResource.class);
             cleanup(rsrc, IgniteInstanceResource.class);
-            cleanup(rsrc, IgniteExecutorServiceResource.class);
-            cleanup(rsrc, IgniteLocalNodeIdResource.class);
-            cleanup(rsrc, IgniteMBeanServerResource.class);
-            cleanup(rsrc, IgniteHomeResource.class);
-            cleanup(rsrc, IgniteMarshallerResource.class);
             cleanup(rsrc, IgniteSpringApplicationContextResource.class);
             cleanup(rsrc, IgniteSpringResource.class);
         }
@@ -446,12 +441,6 @@ class GridResourceCustomInjector implements GridResourceInjector {
             ioc.inject(rsrc, IgniteLoggerResource.class, new GridResourceBasicInjector<>(
                 log.getLogger(rsrcCls)), dep, depCls);
             ioc.inject(rsrc, IgniteInstanceResource.class, gridInjector, dep, depCls);
-            ioc.inject(rsrc, IgniteExecutorServiceResource.class, execInjector, dep, depCls);
-            ioc.inject(rsrc, IgniteLocalNodeIdResource.class, nodeIdInjector, dep, depCls);
-            ioc.inject(rsrc, IgniteMBeanServerResource.class, mbeanServerInjector, dep, depCls);
-            ioc.inject(rsrc, IgniteHomeResource.class, ggHomeInjector, dep, depCls);
-            ioc.inject(rsrc, IgniteNameResource.class, ggNameInjector, dep, depCls);
-            ioc.inject(rsrc, IgniteMarshallerResource.class, marshallerInjector, dep, depCls);
             ioc.inject(rsrc, IgniteSpringApplicationContextResource.class, springCtxInjector, dep, depCls);
             ioc.inject(rsrc, IgniteSpringResource.class, springBeanInjector, dep, depCls);
             ioc.inject(rsrc, IgniteLoggerResource.class, logInjector, dep, depCls);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/core/src/main/java/org/gridgain/grid/kernal/processors/resource/GridResourceProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/resource/GridResourceProcessor.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/resource/GridResourceProcessor.java
index be23993..856990e 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/resource/GridResourceProcessor.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/resource/GridResourceProcessor.java
@@ -17,7 +17,6 @@ import org.apache.ignite.managed.*;
 import org.apache.ignite.marshaller.*;
 import org.apache.ignite.resources.*;
 import org.apache.ignite.spi.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.kernal.*;
 import org.gridgain.grid.kernal.managers.deployment.*;
 import org.gridgain.grid.kernal.processors.*;
@@ -40,13 +39,6 @@ public class GridResourceProcessor extends GridProcessorAdapter {
         IgniteTaskSessionResource.class,
         IgniteJobContextResource.class,
         IgniteInstanceResource.class,
-        IgniteExecutorServiceResource.class,
-        IgniteLocalNodeIdResource.class,
-        IgniteLocalHostResource.class,
-        IgniteMBeanServerResource.class,
-        IgniteHomeResource.class,
-        IgniteNameResource.class,
-        IgniteMarshallerResource.class,
         IgniteSpringApplicationContextResource.class,
         IgniteSpringResource.class,
         IgniteLoggerResource.class,
@@ -59,13 +51,6 @@ public class GridResourceProcessor extends GridProcessorAdapter {
         IgniteLoadBalancerResource.class,
         IgniteTaskContinuousMapperResource.class,
         IgniteInstanceResource.class,
-        IgniteExecutorServiceResource.class,
-        IgniteLocalNodeIdResource.class,
-        IgniteLocalHostResource.class,
-        IgniteMBeanServerResource.class,
-        IgniteHomeResource.class,
-        IgniteNameResource.class,
-        IgniteMarshallerResource.class,
         IgniteSpringApplicationContextResource.class,
         IgniteSpringResource.class,
         IgniteLoggerResource.class,
@@ -238,13 +223,6 @@ public class GridResourceProcessor extends GridProcessorAdapter {
         target = unwrapTarget(target);
 
         ioc.inject(target, IgniteInstanceResource.class, gridInjector, dep, depCls);
-        ioc.inject(target, IgniteExecutorServiceResource.class, execInjector, dep, depCls);
-        ioc.inject(target, IgniteLocalNodeIdResource.class, nodeIdInjector, dep, depCls);
-        ioc.inject(target, IgniteLocalHostResource.class, locHostInjector, dep, depCls);
-        ioc.inject(target, IgniteMBeanServerResource.class, mbeanSrvInjector, dep, depCls);
-        ioc.inject(target, IgniteHomeResource.class, ggHomeInjector, dep, depCls);
-        ioc.inject(target, IgniteNameResource.class, ggNameInjector, dep, depCls);
-        ioc.inject(target, IgniteMarshallerResource.class, marshInjector, dep, depCls);
         ioc.inject(target, IgniteSpringApplicationContextResource.class, springCtxInjector, dep, depCls);
         ioc.inject(target, IgniteSpringResource.class, springBeanInjector, dep, depCls);
         ioc.inject(target, IgniteLoggerResource.class, logInjector, dep, depCls);
@@ -287,13 +265,6 @@ public class GridResourceProcessor extends GridProcessorAdapter {
         obj = unwrapTarget(obj);
 
         // No deployment for lifecycle beans.
-        ioc.inject(obj, IgniteExecutorServiceResource.class, execInjector, null, null);
-        ioc.inject(obj, IgniteLocalNodeIdResource.class, nodeIdInjector, null, null);
-        ioc.inject(obj, IgniteLocalHostResource.class, locHostInjector, null, null);
-        ioc.inject(obj, IgniteMBeanServerResource.class, mbeanSrvInjector, null, null);
-        ioc.inject(obj, IgniteHomeResource.class, ggHomeInjector, null, null);
-        ioc.inject(obj, IgniteNameResource.class, ggNameInjector, null, null);
-        ioc.inject(obj, IgniteMarshallerResource.class, marshInjector, null, null);
         ioc.inject(obj, IgniteSpringApplicationContextResource.class, springCtxInjector, null, null);
         ioc.inject(obj, IgniteSpringResource.class, springBeanInjector, null, null);
         ioc.inject(obj, IgniteInstanceResource.class, gridInjector, null, null);
@@ -316,13 +287,6 @@ public class GridResourceProcessor extends GridProcessorAdapter {
             // Caching key is null for the life-cycle beans.
             ioc.inject(obj, IgniteLoggerResource.class, nullInjector, null, null);
             ioc.inject(obj, IgniteServiceResource.class, nullInjector, null, null);
-            ioc.inject(obj, IgniteExecutorServiceResource.class, nullInjector, null, null);
-            ioc.inject(obj, IgniteLocalNodeIdResource.class, nullInjector, null, null);
-            ioc.inject(obj, IgniteLocalHostResource.class, locHostInjector, null, null);
-            ioc.inject(obj, IgniteMBeanServerResource.class, nullInjector, null, null);
-            ioc.inject(obj, IgniteHomeResource.class, nullInjector, null, null);
-            ioc.inject(obj, IgniteNameResource.class, nullInjector, null, null);
-            ioc.inject(obj, IgniteMarshallerResource.class, nullInjector, null, null);
             ioc.inject(obj, IgniteSpringApplicationContextResource.class, nullInjector, null, null);
             ioc.inject(obj, IgniteSpringResource.class, nullInjector, null, null);
             ioc.inject(obj, IgniteInstanceResource.class, nullInjector, null, null);
@@ -380,20 +344,6 @@ public class GridResourceProcessor extends GridProcessorAdapter {
                         dep, taskCls);
                 else if (annCls == IgniteInstanceResource.class)
                     ioc.inject(job, IgniteInstanceResource.class, gridInjector, dep, taskCls);
-                else if (annCls == IgniteExecutorServiceResource.class)
-                    ioc.inject(job, IgniteExecutorServiceResource.class, execInjector, dep, taskCls);
-                else if (annCls == IgniteLocalNodeIdResource.class)
-                    ioc.inject(job, IgniteLocalNodeIdResource.class, nodeIdInjector, dep, taskCls);
-                else if (annCls == IgniteLocalHostResource.class)
-                    ioc.inject(job, IgniteLocalHostResource.class, locHostInjector, dep, taskCls);
-                else if (annCls == IgniteMBeanServerResource.class)
-                    ioc.inject(job, IgniteMBeanServerResource.class, mbeanSrvInjector, dep, taskCls);
-                else if (annCls == IgniteHomeResource.class)
-                    ioc.inject(job, IgniteHomeResource.class, ggHomeInjector, dep, taskCls);
-                else if (annCls == IgniteNameResource.class)
-                    ioc.inject(job, IgniteNameResource.class, ggNameInjector, dep, taskCls);
-                else if (annCls == IgniteMarshallerResource.class)
-                    ioc.inject(job, IgniteMarshallerResource.class, marshInjector, dep, taskCls);
                 else if (annCls == IgniteSpringApplicationContextResource.class)
                     ioc.inject(job, IgniteSpringApplicationContextResource.class, springCtxInjector, dep, taskCls);
                 else if (annCls == IgniteSpringResource.class)
@@ -458,20 +408,6 @@ public class GridResourceProcessor extends GridProcessorAdapter {
                 injectBasicResource(obj, IgniteTaskContinuousMapperResource.class, mapper, dep, taskCls);
             else if (annCls == IgniteInstanceResource.class)
                 ioc.inject(obj, IgniteInstanceResource.class, gridInjector, dep, taskCls);
-            else if (annCls == IgniteExecutorServiceResource.class)
-                ioc.inject(obj, IgniteExecutorServiceResource.class, execInjector, dep, taskCls);
-            else if (annCls == IgniteLocalNodeIdResource.class)
-                ioc.inject(obj, IgniteLocalNodeIdResource.class, nodeIdInjector, dep, taskCls);
-            else if (annCls == IgniteLocalHostResource.class)
-                ioc.inject(obj, IgniteLocalHostResource.class, locHostInjector, dep, taskCls);
-            else if (annCls == IgniteMBeanServerResource.class)
-                ioc.inject(obj, IgniteMBeanServerResource.class, mbeanSrvInjector, dep, taskCls);
-            else if (annCls == IgniteHomeResource.class)
-                ioc.inject(obj, IgniteHomeResource.class, ggHomeInjector, dep, taskCls);
-            else if (annCls == IgniteNameResource.class)
-                ioc.inject(obj, IgniteNameResource.class, ggNameInjector, dep, taskCls);
-            else if (annCls == IgniteMarshallerResource.class)
-                ioc.inject(obj, IgniteMarshallerResource.class, marshInjector, dep, taskCls);
             else if (annCls == IgniteSpringApplicationContextResource.class)
                 ioc.inject(obj, IgniteSpringApplicationContextResource.class, springCtxInjector, dep, taskCls);
             else if (annCls == IgniteSpringResource.class)
@@ -514,18 +450,11 @@ public class GridResourceProcessor extends GridProcessorAdapter {
         Object obj = unwrapTarget(spi);
 
         // Caching key is null for the SPIs.
-        ioc.inject(obj, IgniteExecutorServiceResource.class, execInjector, null, null);
-        ioc.inject(obj, IgniteLocalNodeIdResource.class, nodeIdInjector, null, null);
-        ioc.inject(obj, IgniteLocalHostResource.class, locHostInjector, null, null);
-        ioc.inject(obj, IgniteMBeanServerResource.class, mbeanSrvInjector, null, null);
-        ioc.inject(obj, IgniteHomeResource.class, ggHomeInjector, null, null);
-        ioc.inject(obj, IgniteNameResource.class, ggNameInjector, null, null);
-        ioc.inject(obj, IgniteMarshallerResource.class, marshInjector, null, null);
         ioc.inject(obj, IgniteSpringApplicationContextResource.class, springCtxInjector, null, null);
         ioc.inject(obj, IgniteSpringResource.class, springBeanInjector, null, null);
         ioc.inject(obj, IgniteLoggerResource.class, logInjector, null, null);
         ioc.inject(obj, IgniteServiceResource.class, srvcInjector, null, null);
-        ioc.inject(obj, IgniteAddressResolverResource.class, addrsRslvrInjector, null, null);
+        ioc.inject(obj, IgniteInstanceResource.class, gridInjector, null, null);
     }
 
     /**
@@ -544,16 +473,9 @@ public class GridResourceProcessor extends GridProcessorAdapter {
 
         ioc.inject(obj, IgniteLoggerResource.class, nullInjector, null, null);
         ioc.inject(obj, IgniteServiceResource.class, nullInjector, null, null);
-        ioc.inject(obj, IgniteExecutorServiceResource.class, nullInjector, null, null);
-        ioc.inject(obj, IgniteLocalNodeIdResource.class, nullInjector, null, null);
-        ioc.inject(obj, IgniteLocalHostResource.class, nullInjector, null, null);
-        ioc.inject(obj, IgniteMBeanServerResource.class, nullInjector, null, null);
-        ioc.inject(obj, IgniteHomeResource.class, nullInjector, null, null);
-        ioc.inject(obj, IgniteNameResource.class, nullInjector, null, null);
-        ioc.inject(obj, IgniteMarshallerResource.class, nullInjector, null, null);
         ioc.inject(obj, IgniteSpringApplicationContextResource.class, nullInjector, null, null);
         ioc.inject(obj, IgniteSpringResource.class, nullInjector, null, null);
-        ioc.inject(obj, IgniteAddressResolverResource.class, nullInjector, null, null);
+        ioc.inject(obj, IgniteInstanceResource.class, nullInjector, null, null);
     }
 
     /**
@@ -570,13 +492,6 @@ public class GridResourceProcessor extends GridProcessorAdapter {
         Object obj = unwrapTarget(lifecycleBean);
 
         // No deployment for lifecycle beans.
-        ioc.inject(obj, IgniteExecutorServiceResource.class, execInjector, null, null);
-        ioc.inject(obj, IgniteLocalNodeIdResource.class, nodeIdInjector, null, null);
-        ioc.inject(obj, IgniteLocalHostResource.class, locHostInjector, null, null);
-        ioc.inject(obj, IgniteMBeanServerResource.class, mbeanSrvInjector, null, null);
-        ioc.inject(obj, IgniteHomeResource.class, ggHomeInjector, null, null);
-        ioc.inject(obj, IgniteNameResource.class, ggNameInjector, null, null);
-        ioc.inject(obj, IgniteMarshallerResource.class, marshInjector, null, null);
         ioc.inject(obj, IgniteSpringApplicationContextResource.class, springCtxInjector, null, null);
         ioc.inject(obj, IgniteSpringResource.class, springBeanInjector, null, null);
         ioc.inject(obj, IgniteInstanceResource.class, gridInjector, null, null);
@@ -601,13 +516,6 @@ public class GridResourceProcessor extends GridProcessorAdapter {
         // Caching key is null for the life-cycle beans.
         ioc.inject(obj, IgniteLoggerResource.class, nullInjector, null, null);
         ioc.inject(obj, IgniteServiceResource.class, nullInjector, null, null);
-        ioc.inject(obj, IgniteExecutorServiceResource.class, nullInjector, null, null);
-        ioc.inject(obj, IgniteLocalNodeIdResource.class, nullInjector, null, null);
-        ioc.inject(obj, IgniteLocalHostResource.class, nullInjector, null, null);
-        ioc.inject(obj, IgniteMBeanServerResource.class, nullInjector, null, null);
-        ioc.inject(obj, IgniteHomeResource.class, nullInjector, null, null);
-        ioc.inject(obj, IgniteNameResource.class, nullInjector, null, null);
-        ioc.inject(obj, IgniteMarshallerResource.class, nullInjector, null, null);
         ioc.inject(obj, IgniteSpringApplicationContextResource.class, nullInjector, null, null);
         ioc.inject(obj, IgniteSpringResource.class, nullInjector, null, null);
         ioc.inject(obj, IgniteInstanceResource.class, nullInjector, null, null);
@@ -627,13 +535,6 @@ public class GridResourceProcessor extends GridProcessorAdapter {
         Object obj = unwrapTarget(svc);
 
         // No deployment for lifecycle beans.
-        ioc.inject(obj, IgniteExecutorServiceResource.class, execInjector, null, null);
-        ioc.inject(obj, IgniteLocalNodeIdResource.class, nodeIdInjector, null, null);
-        ioc.inject(obj, IgniteLocalHostResource.class, locHostInjector, null, null);
-        ioc.inject(obj, IgniteMBeanServerResource.class, mbeanSrvInjector, null, null);
-        ioc.inject(obj, IgniteHomeResource.class, ggHomeInjector, null, null);
-        ioc.inject(obj, IgniteNameResource.class, ggNameInjector, null, null);
-        ioc.inject(obj, IgniteMarshallerResource.class, marshInjector, null, null);
         ioc.inject(obj, IgniteSpringApplicationContextResource.class, springCtxInjector, null, null);
         ioc.inject(obj, IgniteSpringResource.class, springBeanInjector, null, null);
         ioc.inject(obj, IgniteInstanceResource.class, gridInjector, null, null);
@@ -658,13 +559,6 @@ public class GridResourceProcessor extends GridProcessorAdapter {
         // Caching key is null for the life-cycle beans.
         ioc.inject(obj, IgniteLoggerResource.class, nullInjector, null, null);
         ioc.inject(obj, IgniteServiceResource.class, nullInjector, null, null);
-        ioc.inject(obj, IgniteExecutorServiceResource.class, nullInjector, null, null);
-        ioc.inject(obj, IgniteLocalNodeIdResource.class, nullInjector, null, null);
-        ioc.inject(obj, IgniteLocalHostResource.class, nullInjector, null, null);
-        ioc.inject(obj, IgniteMBeanServerResource.class, nullInjector, null, null);
-        ioc.inject(obj, IgniteHomeResource.class, nullInjector, null, null);
-        ioc.inject(obj, IgniteNameResource.class, nullInjector, null, null);
-        ioc.inject(obj, IgniteMarshallerResource.class, nullInjector, null, null);
         ioc.inject(obj, IgniteSpringApplicationContextResource.class, nullInjector, null, null);
         ioc.inject(obj, IgniteSpringResource.class, nullInjector, null, null);
         ioc.inject(obj, IgniteInstanceResource.class, nullInjector, null, null);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/core/src/main/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemoryServerEndpoint.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemoryServerEndpoint.java b/modules/core/src/main/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemoryServerEndpoint.java
index 97ffd0e..4b64ede 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemoryServerEndpoint.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemoryServerEndpoint.java
@@ -93,11 +93,9 @@ public class GridIpcSharedMemoryServerEndpoint implements GridIpcServerEndpoint
     private IgniteLogger log;
 
     /** Local node ID. */
-    @IgniteLocalNodeIdResource
     private UUID locNodeId;
 
     /** Grid name. */
-    @IgniteNameResource
     private String gridName;
 
     /** Flag allowing not to print out of resources warning. */
@@ -317,6 +315,25 @@ public class GridIpcSharedMemoryServerEndpoint implements GridIpcServerEndpoint
     }
 
     /**
+     * Injects resources.
+     *
+     * @param ignite Ignite
+     */
+    @IgniteInstanceResource
+    private void injectResources(Ignite ignite){
+        if (ignite != null) {
+            // Inject resources.
+            gridName = ignite.name();
+            locNodeId = ignite.configuration().getNodeId();
+        }
+        else {
+            // Cleanup resources.
+            gridName = null;
+            locNodeId = null;
+        }
+    }
+
+    /**
      * @param out Output stream.
      * @param err Error cause.
      */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java
index 5031b2f..b97ad33 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java
@@ -232,10 +232,6 @@ public class GridCacheDhtLockBackupSelfTest extends GridCommonAbstractTest {
         /** */
         private int delayTime;
 
-        /** */
-        @IgniteMarshallerResource
-        private IgniteMarshaller marsh;
-
         /**
          * Creates test communication spi.
          *

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java
index 3684f5e..8c0c9be 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java
@@ -138,10 +138,6 @@ public class GridOrderedMessageCancelSelfTest extends GridCommonAbstractTest {
      * Communication SPI.
      */
     private static class CommunicationSpi extends TcpCommunicationSpi {
-        /** */
-        @IgniteMarshallerResource
-        private IgniteMarshaller marsh;
-
         /** {@inheritDoc} */
         @Override protected void notifyListener(UUID sndId, GridTcpCommunicationMessageAdapter msg,
             IgniteRunnable msgC) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/GridTcpClientDiscoverySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/GridTcpClientDiscoverySelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/GridTcpClientDiscoverySelfTest.java
index 304e088..b831ccb 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/GridTcpClientDiscoverySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/GridTcpClientDiscoverySelfTest.java
@@ -668,12 +668,12 @@ public class GridTcpClientDiscoverySelfTest extends GridCommonAbstractTest {
     /**
      */
     private static class MessageListener implements IgniteBiPredicate<UUID, Object> {
-        @IgniteLocalNodeIdResource
-        private UUID nodeId;
+        @IgniteInstanceResource
+        private Ignite ignite;
 
         /** {@inheritDoc} */
         @Override public boolean apply(UUID uuid, Object msg) {
-            X.println(">>> Received [locNodeId=" + nodeId + ", msg=" + msg + ']');
+            X.println(">>> Received [locNodeId=" + ignite.configuration().getNodeId() + ", msg=" + msg + ']');
 
             msgLatch.countDown();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/core/src/test/java/org/gridgain/grid/kernal/GridCancelOnGridStopSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridCancelOnGridStopSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridCancelOnGridStopSelfTest.java
index c20926e..a51e97e 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridCancelOnGridStopSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridCancelOnGridStopSelfTest.java
@@ -60,14 +60,14 @@ public class GridCancelOnGridStopSelfTest extends GridCommonAbstractTest {
      */
     private static final class CancelledTask extends ComputeTaskAdapter<String, Void> {
         /** */
-        @IgniteLocalNodeIdResource
-        private UUID locId;
+        @IgniteInstanceResource
+        private Ignite ignite;
 
         /** {@inheritDoc} */
         @Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, @Nullable String arg)
             throws IgniteCheckedException {
             for (ClusterNode node : subgrid) {
-                if (node.id().equals(locId)) {
+                if (node.id().equals(ignite.configuration().getNodeId())) {
                     return Collections.singletonMap(new ComputeJob() {
                         @Override public void cancel() {
                             cancelCall = true;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/core/src/test/java/org/gridgain/grid/kernal/GridExplicitImplicitDeploymentSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridExplicitImplicitDeploymentSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridExplicitImplicitDeploymentSelfTest.java
index 4b5a5fa..ef4cf59 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridExplicitImplicitDeploymentSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridExplicitImplicitDeploymentSelfTest.java
@@ -391,8 +391,8 @@ public class GridExplicitImplicitDeploymentSelfTest extends GridCommonAbstractTe
     @ComputeTaskName("GridDeploymentResourceTestTask")
     public static class GridDeploymentResourceTestTask extends ComputeTaskAdapter<String, Integer> {
         /** */
-        @IgniteLocalNodeIdResource
-        private UUID locId;
+        @IgniteInstanceResource
+        private Ignite ignite;
 
         /** {@inheritDoc} */
         @Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, String arg) throws IgniteCheckedException {
@@ -400,6 +400,8 @@ public class GridExplicitImplicitDeploymentSelfTest extends GridCommonAbstractTe
 
             boolean ignoreLocNode = false;
 
+            UUID locId = ignite.configuration().getNodeId();
+
             if (subgrid.size() == 1)
                 assert subgrid.get(0).id().equals(locId) : "Wrong node id.";
             else

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverCustomTopologySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverCustomTopologySelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverCustomTopologySelfTest.java
index c695b84..8f18923 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverCustomTopologySelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverCustomTopologySelfTest.java
@@ -116,11 +116,15 @@ public class GridFailoverCustomTopologySelfTest extends GridCommonAbstractTest {
         private IgniteLogger log;
 
          /** */
-        @IgniteLocalNodeIdResource
-        private UUID locNodeId;
+        @IgniteInstanceResource
+        private Ignite ignite;
 
         /** {@inheritDoc} */
         @Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, String arg) throws IgniteCheckedException {
+            assert ignite != null;
+
+            UUID locNodeId = ignite.configuration().getNodeId();
+
             assert locNodeId != null;
 
             if (log.isInfoEnabled())
@@ -135,12 +139,16 @@ public class GridFailoverCustomTopologySelfTest extends GridCommonAbstractTest {
 
             return Collections.singletonMap(new ComputeJobAdapter(locNodeId) {
                 /** */
-               @IgniteLocalNodeIdResource
-               private UUID nodeId;
+               @IgniteInstanceResource
+               private Ignite ignite;
 
                 /** {@inheritDoc} */
                 @SuppressWarnings("NakedNotify")
                 @Override public Serializable execute() throws IgniteCheckedException {
+                    assert ignite != null;
+
+                    UUID nodeId = ignite.configuration().getNodeId();
+
                     assert nodeId != null;
 
                     if (!nodeId.equals(argument(0))) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverSelfTest.java
index b0fba9b..5f2a5ae 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverSelfTest.java
@@ -82,14 +82,16 @@ public class GridFailoverSelfTest extends GridCommonAbstractTest {
             nodeRef.set(subgrid.get(0));
 
             return Collections.singletonMap(new ComputeJobAdapter(arg) {
-                /** Local node ID. */
-                @IgniteLocalNodeIdResource
-                private UUID locId;
+                /** Ignite instance. */
+                @IgniteInstanceResource
+                private Ignite ignite;
 
                 /** {@inheritDoc} */
                 @Override public Serializable execute() throws IgniteCheckedException {
                     boolean fail;
 
+                    UUID locId = ignite.configuration().getNodeId();
+
                     try {
                         fail = ses.<String, Boolean>waitForAttribute("fail", 0);
                     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverTaskWithPredicateSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverTaskWithPredicateSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverTaskWithPredicateSelfTest.java
index 893b213..141534d 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverTaskWithPredicateSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverTaskWithPredicateSelfTest.java
@@ -190,10 +190,6 @@ public class GridFailoverTaskWithPredicateSelfTest extends GridCommonAbstractTes
             ses.setAttribute("fail", true);
 
             return Collections.singletonMap(new ComputeJobAdapter(arg) {
-                /** Local node ID. */
-                @IgniteLocalNodeIdResource
-                private UUID locId;
-
                 /** {@inheritDoc} */
                 @SuppressWarnings({"RedundantTypeArguments"})
                 @Override

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverTopologySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverTopologySelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverTopologySelfTest.java
index d704f03..09722cf 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverTopologySelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverTopologySelfTest.java
@@ -43,9 +43,9 @@ public class GridFailoverTopologySelfTest extends GridCommonAbstractTest {
         cfg.setNodeId(null);
 
         cfg.setFailoverSpi(new AlwaysFailoverSpi() {
-            /** */
-            @IgniteLocalNodeIdResource
-            private UUID locNodeId;
+            /** Ignite instance. */
+            @IgniteInstanceResource
+            private Ignite ignite;
 
             /** {@inheritDoc} */
             @Override public ClusterNode failover(FailoverContext ctx, List<ClusterNode> grid) {
@@ -55,6 +55,8 @@ public class GridFailoverTopologySelfTest extends GridCommonAbstractTest {
                     error("Unexpected grid size [expected=1, grid=" + grid + ']');
                 }
 
+                UUID locNodeId = ignite.configuration().getNodeId();
+
                 for (ClusterNode node : grid) {
                     if (node.id().equals(locNodeId)) {
                         failed.set(true);
@@ -101,15 +103,19 @@ public class GridFailoverTopologySelfTest extends GridCommonAbstractTest {
 
     /** */
     private static class JobFailTask implements ComputeTask<String, Object> {
-         /** */
-        @IgniteLocalNodeIdResource
-        private UUID locNodeId;
+        /** Ignite instance. */
+        @IgniteInstanceResource
+        private Ignite ignite;
 
         /** */
         private boolean jobFailedOver;
 
         /** {@inheritDoc} */
         @Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, String arg) throws IgniteCheckedException {
+            assert ignite != null;
+
+            UUID locNodeId = ignite.configuration().getNodeId();
+
             assert locNodeId != null;
 
             ClusterNode remoteNode = null;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobContextSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobContextSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobContextSelfTest.java
index 82d4961..eed3b38 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobContextSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobContextSelfTest.java
@@ -56,12 +56,14 @@ public class GridJobContextSelfTest extends GridCommonAbstractTest {
                     @IgniteJobContextResource
                     private ComputeJobContext jobCtx;
 
-                    /** */
-                    @IgniteLocalNodeIdResource
-                    private UUID locNodeId;
+                    /** Ignite instance. */
+                    @IgniteInstanceResource
+                    private Ignite ignite;
 
                     /** {@inheritDoc} */
                     @Override public Serializable execute() {
+                        UUID locNodeId = ignite.configuration().getNodeId();
+
                         jobCtx.setAttribute("nodeId", locNodeId);
                         jobCtx.setAttribute("jobId", jobCtx.getJobId());
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobMasterLeaveAwareSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobMasterLeaveAwareSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobMasterLeaveAwareSelfTest.java
index 6aae0f6..5057cbf 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobMasterLeaveAwareSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobMasterLeaveAwareSelfTest.java
@@ -714,10 +714,6 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest {
      * Communication SPI which could optionally block outgoing messages.
      */
     private static class CommunicationSpi extends TcpCommunicationSpi {
-        /** Marshaller. */
-        @IgniteMarshallerResource
-        private IgniteMarshaller marsh;
-
         /** Whether to block all outgoing messages. */
         private volatile boolean block;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/core/src/test/java/org/gridgain/grid/kernal/GridMultipleSpisSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridMultipleSpisSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridMultipleSpisSelfTest.java
index c7fde8e..7f8730f 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridMultipleSpisSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridMultipleSpisSelfTest.java
@@ -261,9 +261,9 @@ public class GridMultipleSpisSelfTest extends GridCommonAbstractTest {
      * Job that always throws exception.
      */
     private static class GridTestMultipleSpisJob extends ComputeJobAdapter {
-        /** Local node ID. */
-        @IgniteLocalNodeIdResource
-        private UUID locId;
+        /** Ignite instance. */
+        @IgniteInstanceResource
+        private Ignite ignite;
 
         /** */
         @IgniteTaskSessionResource
@@ -278,12 +278,12 @@ public class GridMultipleSpisSelfTest extends GridCommonAbstractTest {
 
         /** {@inheritDoc} */
         @Override public UUID execute() throws IgniteCheckedException {
-            assert locId != null;
+            assert ignite != null;
             assert jobSes != null;
             assert argument(0) != null;
 
             // Should always fail on task originating node and work on another one.
-            if (locId.equals(argument(0)))
+            if (ignite.configuration().getNodeId().equals(argument(0)))
                 throw new IgniteCheckedException("Expected exception to failover job.");
 
             // Use checkpoint on job side. This will happen on remote node.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/core/src/test/java/org/gridgain/grid/kernal/GridMultipleVersionsDeploymentSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridMultipleVersionsDeploymentSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridMultipleVersionsDeploymentSelfTest.java
index 3753614..60c03c5 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridMultipleVersionsDeploymentSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridMultipleVersionsDeploymentSelfTest.java
@@ -226,9 +226,9 @@ public class GridMultipleVersionsDeploymentSelfTest extends GridCommonAbstractTe
     @SuppressWarnings({"PublicInnerClass"})
     @ComputeTaskName(value="GridDeploymentTestTask")
     public static class GridDeploymentTestTask extends ComputeTaskAdapter<Object, Object> {
-        /** */
-        @IgniteLocalNodeIdResource
-        private UUID locNodeId;
+        /** Ignite instance. */
+        @IgniteInstanceResource
+        private Ignite ignite;
 
         /** {@inheritDoc} */
         @Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, Object arg) throws IgniteCheckedException {
@@ -236,6 +236,12 @@ public class GridMultipleVersionsDeploymentSelfTest extends GridCommonAbstractTe
 
             boolean ignoreLocNode = false;
 
+            assert ignite != null;
+
+            UUID locNodeId = ignite.configuration().getNodeId();
+
+            assert locNodeId != null;
+
             if (subgrid.size() == 1)
                 assert subgrid.get(0).id().equals(locNodeId) : "Wrong node id.";
             else

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/core/src/test/java/org/gridgain/grid/kernal/GridRuntimeExceptionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridRuntimeExceptionSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridRuntimeExceptionSelfTest.java
index 967ffd3..d4c649a 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridRuntimeExceptionSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridRuntimeExceptionSelfTest.java
@@ -207,9 +207,9 @@ public class GridRuntimeExceptionSelfTest extends GridCommonAbstractTest {
         @IgniteLoggerResource
         private IgniteLogger log;
 
-        /** */
-        @IgniteLocalNodeIdResource
-        private UUID nodeId;
+        /** Ignite instance. */
+        @IgniteInstanceResource
+        private Ignite ignite;
 
         /** */
         private FailType failType;
@@ -229,7 +229,7 @@ public class GridRuntimeExceptionSelfTest extends GridCommonAbstractTest {
             Map<ComputeJob, ClusterNode> map = new HashMap<>(2);
 
             assert subgrid.size() == 1;
-            assert subgrid.get(0).id().equals(nodeId);
+            assert subgrid.get(0).id().equals(ignite.configuration().getNodeId());
 
             map.put(new GridTaskFailedTestJob(null), subgrid.get(0));
             map.put(new GridTaskFailedTestJob(failType), subgrid.get(0));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/core/src/test/java/org/gridgain/grid/kernal/GridStopWithCancelSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridStopWithCancelSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridStopWithCancelSelfTest.java
index 89f6ee2..f32b497 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridStopWithCancelSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridStopWithCancelSelfTest.java
@@ -71,15 +71,15 @@ public class GridStopWithCancelSelfTest extends GridCommonAbstractTest {
      */
     @SuppressWarnings({"PublicInnerClass"})
     public static final class CancelledTask extends ComputeTaskAdapter<String, Object> {
-        /** */
-        @IgniteLocalNodeIdResource
-        private UUID locId;
+        /** Ignite instance. */
+        @IgniteInstanceResource
+        private Ignite ignite;
 
         /** {@inheritDoc} */
         @Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid,
             @Nullable String arg) throws IgniteCheckedException {
             for (ClusterNode node : subgrid) {
-                if (node.id().equals(locId)) {
+                if (node.id().equals(ignite.configuration().getNodeId())) {
                     return Collections.singletonMap(new ComputeJobAdapter() {
                         @IgniteInstanceResource
                         private Ignite ignite;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/core/src/test/java/org/gridgain/grid/kernal/GridStopWithWaitSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridStopWithWaitSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridStopWithWaitSelfTest.java
index c7b0f2a..2b3627e 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridStopWithWaitSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridStopWithWaitSelfTest.java
@@ -162,22 +162,22 @@ public class GridStopWithWaitSelfTest extends GridCommonAbstractTest {
         @IgniteTaskSessionResource
         private ComputeTaskSession ses;
 
-        /** */
-        @IgniteLocalNodeIdResource
-        private UUID locId;
+        /** Ignite instance. */
+        @IgniteInstanceResource
+        private Ignite ignite;
 
         /** {@inheritDoc} */
         @Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, String arg) throws IgniteCheckedException {
             ses.setAttribute("fail", true);
 
-            ClusterNode node = F.view(subgrid, F.<ClusterNode>remoteNodes(locId)).iterator().next();
+            ClusterNode node = F.view(subgrid, F.remoteNodes(ignite.configuration().getNodeId())).iterator().next();
 
             nodeRef.set(node);
 
             return Collections.singletonMap(new ComputeJobAdapter(arg) {
-                /** Local node ID. */
-                @IgniteLocalNodeIdResource
-                private UUID locId;
+                /** Ignite instance. */
+                @IgniteInstanceResource
+                private Ignite ignite;
 
                 /** Logger. */
                 @IgniteLoggerResource
@@ -190,6 +190,12 @@ public class GridStopWithWaitSelfTest extends GridCommonAbstractTest {
 
                     boolean fail;
 
+                    assert ignite != null;
+
+                    UUID locId = ignite.configuration().getNodeId();
+
+                    assert locId != null;
+
                     try {
                         fail = ses.waitForAttribute("fail", 0);
                     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskInstantiationSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskInstantiationSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskInstantiationSelfTest.java
index 2ce5c70..0f39a0d 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskInstantiationSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskInstantiationSelfTest.java
@@ -54,15 +54,15 @@ public class GridTaskInstantiationSelfTest extends GridCommonAbstractTest {
      * Test task defined as private inner class.
      */
     private static class PrivateClassTask extends ComputeTaskAdapter<String, Object> {
-        /** */
-        @IgniteLocalNodeIdResource
-        private UUID locId;
+        /** Ignite instance. */
+        @IgniteInstanceResource
+        private Ignite ignite;
 
         /** {@inheritDoc} */
         @Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid,
             @Nullable String arg) throws IgniteCheckedException {
             for (ClusterNode node : subgrid)
-                if (node.id().equals(locId))
+                if (node.id().equals(ignite.configuration().getNodeId()))
                     return Collections.singletonMap(new ComputeJobAdapter() {
                         @Override public Serializable execute() {
                             return null;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/core/src/test/java/org/gridgain/grid/kernal/managers/checkpoint/GridCheckpointTaskSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/managers/checkpoint/GridCheckpointTaskSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/managers/checkpoint/GridCheckpointTaskSelfTest.java
index f8f8392..0164a16 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/managers/checkpoint/GridCheckpointTaskSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/managers/checkpoint/GridCheckpointTaskSelfTest.java
@@ -142,14 +142,15 @@ public class GridCheckpointTaskSelfTest extends GridCommonAbstractTest {
 
             return F.asMap(
                 new ComputeJobAdapter() {
-                    @IgniteLocalNodeIdResource
-                    private UUID nodeId;
+                    /** Ignite instance. */
+                    @IgniteInstanceResource
+                    private Ignite ignite;
 
                     @IgniteTaskSessionResource
                     private ComputeTaskSession ses;
 
                     @Override public Object execute() throws IgniteCheckedException {
-                        X.println("Executing FailoverTestTask job on node " + nodeId);
+                        X.println("Executing FailoverTestTask job on node " + ignite.configuration().getNodeId());
 
                         Boolean cpVal = ses.loadCheckpoint(CP_KEY);
 
@@ -196,14 +197,15 @@ public class GridCheckpointTaskSelfTest extends GridCommonAbstractTest {
 
             return F.asMap(
                 new ComputeJobAdapter() {
-                    @IgniteLocalNodeIdResource
-                    private UUID nodeId;
+                    /** Ignite instance. */
+                    @IgniteInstanceResource
+                    private Ignite ignite;
 
                     @IgniteTaskSessionResource
                     private ComputeTaskSession ses;
 
                     @Override public Object execute() throws IgniteCheckedException {
-                        X.println("Executing ReduceTestTask job on node " + nodeId);
+                        X.println("Executing ReduceTestTask job on node " + ignite.configuration().getNodeId());
 
                         ses.saveCheckpoint(CP_KEY, true);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/core/src/test/java/org/gridgain/grid/kernal/processors/continuous/GridMessageListenSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/continuous/GridMessageListenSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/continuous/GridMessageListenSelfTest.java
index be0a11c..69733b9 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/continuous/GridMessageListenSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/continuous/GridMessageListenSelfTest.java
@@ -423,14 +423,6 @@ public class GridMessageListenSelfTest extends GridCommonAbstractTest {
         @IgniteInstanceResource
         private Ignite ignite;
 
-        /** */
-        @IgniteLocalNodeIdResource
-        private UUID locNodeId;
-
-        /** */
-        @IgniteExecutorServiceResource
-        private ExecutorService exec;
-
         /**
          * @param prj Projection.
          * @param ret Return value.
@@ -443,15 +435,14 @@ public class GridMessageListenSelfTest extends GridCommonAbstractTest {
         /** {@inheritDoc} */
         @Override public boolean apply(UUID nodeId, Object msg) {
             assertNotNull(ignite);
-            assertNotNull(locNodeId);
-            assertNotNull(exec);
+            assertNotNull(ignite.configuration().getNodeId());
 
             X.println("Received message [nodeId=" + nodeId + ", locNodeId=" + ignite.cluster().localNode().id() + ']');
 
             assertEquals(prj.ignite().cluster().localNode().id(), nodeId);
             assertEquals(MSG, msg);
 
-            nodes.add(locNodeId);
+            nodes.add(ignite.configuration().getNodeId());
             cnt.incrementAndGet();
             latch.countDown();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PJobClassLoaderSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PJobClassLoaderSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PJobClassLoaderSelfTest.java
index 6ca5e49..859cc0e 100644
--- a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PJobClassLoaderSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PJobClassLoaderSelfTest.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
 import org.apache.ignite.compute.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
 import org.gridgain.testframework.junits.common.*;
 
 import java.io.*;
@@ -50,7 +49,7 @@ public class GridP2PJobClassLoaderSelfTest extends GridCommonAbstractTest {
         try {
             Ignite ignite = startGrid(1);
 
-            ignite.compute().execute(UserResourceTask.class, null);
+            ignite.compute().execute(Task.class, null);
         }
         finally {
             stopGrid(1);
@@ -103,11 +102,7 @@ public class GridP2PJobClassLoaderSelfTest extends GridCommonAbstractTest {
     /**
      * Task that will always fail due to non-transient resource injection.
      */
-    public static class UserResourceTask extends ComputeTaskSplitAdapter<Object, Object> {
-        /** */
-        @IgniteUserResource
-        private transient UserResource rsrcTask;
-
+    public static class Task extends ComputeTaskSplitAdapter<Object, Object> {
         /**
          * ClassLoader loaded task.
          */
@@ -115,8 +110,6 @@ public class GridP2PJobClassLoaderSelfTest extends GridCommonAbstractTest {
 
         /** {@inheritDoc} */
         @Override protected Collection<? extends ComputeJob> split(int gridSize, Object arg) throws IgniteCheckedException {
-            assert rsrcTask != null;
-
             assert gridSize == 1;
 
             ldr = getClass().getClassLoader();
@@ -129,8 +122,6 @@ public class GridP2PJobClassLoaderSelfTest extends GridCommonAbstractTest {
                     /** {@inheritDoc} */
                     @SuppressWarnings({"ObjectEquality"})
                     public Serializable execute() throws IgniteCheckedException {
-                        assert rsrcJob == rsrcTask;
-
                         assert getClass().getClassLoader() == ldr;
 
                         return null;
@@ -140,8 +131,6 @@ public class GridP2PJobClassLoaderSelfTest extends GridCommonAbstractTest {
 
         /** {@inheritDoc} */
         @Override public Object reduce(List<ComputeJobResult> results) throws IgniteCheckedException {
-            assert rsrcTask != null;
-
             // Nothing to reduce.
             return null;
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PLocalDeploymentSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PLocalDeploymentSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PLocalDeploymentSelfTest.java
index 33b2a57..2d129db 100644
--- a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PLocalDeploymentSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PLocalDeploymentSelfTest.java
@@ -253,9 +253,9 @@ public class GridP2PLocalDeploymentSelfTest extends GridCommonAbstractTest {
             @IgniteUserResource
             private transient UserResource rsrc;
 
-            /** Local node ID. */
-            @IgniteLocalNodeIdResource
-            private UUID locNodeId;
+            /** Ignite instance. */
+            @IgniteInstanceResource
+            private Ignite ignite;
 
             /**
              * @param nodeId Node ID for node this job is supposed to execute on.
@@ -264,7 +264,7 @@ public class GridP2PLocalDeploymentSelfTest extends GridCommonAbstractTest {
 
             /** {@inheritDoc} */
             @Override public Serializable execute() throws IgniteCheckedException {
-                assert locNodeId.equals(argument(0)) == true;
+                assert ignite.configuration().getNodeId().equals(argument(0));
 
                 jobRsrc = rsrc;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PRemoteClassLoadersSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PRemoteClassLoadersSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PRemoteClassLoadersSelfTest.java
index 4d8dd23..7f67710 100644
--- a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PRemoteClassLoadersSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PRemoteClassLoadersSelfTest.java
@@ -233,9 +233,9 @@ public class GridP2PRemoteClassLoadersSelfTest extends GridCommonAbstractTest {
         @IgniteLoggerResource
         private IgniteLogger log;
 
-        /** */
-        @IgniteLocalNodeIdResource
-        private UUID nodeId;
+        /** Ignite instance. */
+        @IgniteInstanceResource
+        private Ignite ignite;
 
         /** {@inheritDoc} */
         @Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, Serializable arg)
@@ -243,7 +243,7 @@ public class GridP2PRemoteClassLoadersSelfTest extends GridCommonAbstractTest {
             Map<ComputeJob, ClusterNode> map = new HashMap<>(subgrid.size());
 
             for (ClusterNode node : subgrid) {
-                if (!node.id().equals(nodeId))
+                if (!node.id().equals(ignite.configuration().getNodeId()))
                     map.put(new GridP2PTestJob(null) , node);
             }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTestJob.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTestJob.java b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTestJob.java
index a38c768..ee18d13 100644
--- a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTestJob.java
+++ b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTestJob.java
@@ -29,9 +29,10 @@ public class GridP2PTestJob extends ComputeJobAdapter {
     @IgniteLoggerResource
     private IgniteLogger log;
 
-    /** Injected grid. */
-    @IgniteLocalNodeIdResource
-    private UUID locNodeId;
+    /** Ignite instance. */
+    @IgniteInstanceResource
+    private Ignite ignite;
+
 
     /**
      * @param arg is argument of GridP2PTestJob.
@@ -49,7 +50,7 @@ public class GridP2PTestJob extends ComputeJobAdapter {
         if (log.isInfoEnabled())
             log.info("Executing job loaded by class loader: " + ldr.getClass().getName());
 
-        if (argument(0) != null && locNodeId.equals(taskSes.getTaskNodeId())) {
+        if (argument(0) != null && ignite.configuration().getNodeId().equals(taskSes.getTaskNodeId())) {
             log.error("Remote job is executed on local node.");
 
             return -1;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTestTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTestTask.java b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTestTask.java
index d4050a8..2692eea 100644
--- a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTestTask.java
+++ b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTestTask.java
@@ -29,9 +29,9 @@ public class GridP2PTestTask extends ComputeTaskAdapter<Object, Integer> {
     @IgniteLoggerResource
     private IgniteLogger log;
 
-    /** */
-    @IgniteLocalNodeIdResource
-    private UUID nodeId;
+    /** Ignite instance. */
+    @IgniteInstanceResource
+    private Ignite ignite;
 
     /** {@inheritDoc} */
     @Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, Object arg) throws IgniteCheckedException {
@@ -50,7 +50,7 @@ public class GridP2PTestTask extends ComputeTaskAdapter<Object, Integer> {
         Map<ComputeJob, ClusterNode> map = new HashMap<>(subgrid.size());
 
         for (ClusterNode node : subgrid)
-            if (!node.id().equals(nodeId))
+            if (!node.id().equals(ignite.configuration().getNodeId()))
                 map.put(new GridP2PTestJob(arg1), node);
 
         return map;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCheckpointAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCheckpointAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCheckpointAbstractSelfTest.java
index f98e038..60c0743 100644
--- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCheckpointAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCheckpointAbstractSelfTest.java
@@ -143,8 +143,8 @@ public abstract class GridSessionCheckpointAbstractSelfTest extends GridCommonAb
         private ComputeTaskSession ses;
 
         /** */
-        @IgniteMarshallerResource
-        private IgniteMarshaller marshaller;
+        @IgniteInstanceResource
+        private Ignite ignite;
 
         /** {@inheritDoc} */
         @Override protected Collection<ComputeJobAdapter> split(int gridSize, Object arg) throws IgniteCheckedException {
@@ -201,16 +201,17 @@ public abstract class GridSessionCheckpointAbstractSelfTest extends GridCommonAb
                 // Check task and job states.
                 for (int i =  0; i < SPLIT_COUNT; i++) {
                     // Check task map state.
-                    checkRunningState("map:session:key:" + i, "map:session:testval:" + i,
-                        "map:global:key:" + i, "map:global:testval:" + i, marshaller, getClass().getClassLoader());
+                    checkRunningState("map:session:key:" + i, "map:session:testval:" + i, "map:global:key:" + i,
+                        "map:global:testval:" + i, ignite.configuration().getMarshaller(), getClass().getClassLoader());
 
                     // Check task reduce state.
                     checkRunningState("reduce:session:key:" + i, "reduce:session:testval:" + i,
-                        "reduce:global:key:" + i, "reduce:global:testval:" + i, marshaller, getClass().getClassLoader());
+                            "reduce:global:key:" + i, "reduce:global:testval:" + i,
+                            ignite.configuration().getMarshaller(), getClass().getClassLoader());
 
                     // Check task map state.
-                    checkRunningState("job:session:key:" + i, "job:session:testval:" + i,
-                        "job:global:key:" + i, "job:global:testval:" + i, marshaller, getClass().getClassLoader());
+                    checkRunningState("job:session:key:" + i, "job:session:testval:" + i, "job:global:key:" + i,
+                        "job:global:testval:" + i, ignite.configuration().getMarshaller(), getClass().getClassLoader());
                 }
             }
             catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/core/src/test/java/org/gridgain/grid/session/GridSessionJobFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionJobFailoverSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionJobFailoverSelfTest.java
index 2a0493f..0da1851 100644
--- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionJobFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionJobFailoverSelfTest.java
@@ -86,10 +86,7 @@ public class GridSessionJobFailoverSelfTest extends GridCommonAbstractTest {
             }
 
             return Collections.singletonMap(new ComputeJobAdapter(arg) {
-                /** */
-                @IgniteLocalNodeIdResource
-                private UUID locNodeId;
-
+                /** {@inheritDoc} */
                 @Override public Serializable execute() throws IgniteCheckedException {
                     boolean fail;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/core/src/test/java/org/gridgain/loadtests/direct/stealing/GridStealingLoadTestJob.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/loadtests/direct/stealing/GridStealingLoadTestJob.java b/modules/core/src/test/java/org/gridgain/loadtests/direct/stealing/GridStealingLoadTestJob.java
index 116dada..705e391 100644
--- a/modules/core/src/test/java/org/gridgain/loadtests/direct/stealing/GridStealingLoadTestJob.java
+++ b/modules/core/src/test/java/org/gridgain/loadtests/direct/stealing/GridStealingLoadTestJob.java
@@ -25,9 +25,9 @@ public class GridStealingLoadTestJob extends ComputeJobAdapter {
     @IgniteLoggerResource
     private IgniteLogger log;
 
-    /** */
-    @IgniteLocalNodeIdResource
-    private UUID nodeId;
+    /** Ignite instance. */
+    @IgniteInstanceResource
+    private Ignite ignite;
 
     /** */
     @IgniteJobContextResource
@@ -35,6 +35,8 @@ public class GridStealingLoadTestJob extends ComputeJobAdapter {
 
     /** {@inheritDoc} */
     @Override public Serializable execute() throws IgniteCheckedException {
+        UUID nodeId = ignite.configuration().getNodeId();
+
         if (log.isDebugEnabled())
             log.debug("Executing job on node [nodeId=" + nodeId + ", jobId=" + ctx.getJobId() + ']');
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/core/src/test/java/org/gridgain/loadtests/job/GridJobLoadTestJob.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/loadtests/job/GridJobLoadTestJob.java b/modules/core/src/test/java/org/gridgain/loadtests/job/GridJobLoadTestJob.java
index c3b293a..c604a1a 100644
--- a/modules/core/src/test/java/org/gridgain/loadtests/job/GridJobLoadTestJob.java
+++ b/modules/core/src/test/java/org/gridgain/loadtests/job/GridJobLoadTestJob.java
@@ -41,9 +41,9 @@ public class GridJobLoadTestJob implements ComputeJob {
     @IgniteLoggerResource
     private IgniteLogger log;
 
-    /** Local node id. */
-    @IgniteLocalNodeIdResource
-    private UUID nodeId;
+    /** Ignite instance. */
+    @IgniteInstanceResource
+    private Ignite ignite;
 
     /** Job context. */
     @IgniteJobContextResource
@@ -135,7 +135,8 @@ public class GridJobLoadTestJob implements ComputeJob {
                 // We shouldn't run in situation when some elements emitted before are missed and the current exists.
                 assert ! (valMissed && val != null) :
                     "Inconsistent session attribute set was received [missedAttribute=" + i +
-                    ", jobId=" + cntx.getJobId() + ", attrs=" + attrs + ", nodeId=" + nodeId + "]";
+                    ", jobId=" + cntx.getJobId() + ", attrs=" + attrs + ", nodeId=" +
+                    ignite.configuration().getNodeId() + "]";
 
                 valMissed = (val == null);
             }
@@ -148,6 +149,7 @@ public class GridJobLoadTestJob implements ComputeJob {
      * @return String with current job representation.
      */
     private String getJobInfo() {
-        return "[taskId=" + taskSes.getId() + ", jobId=" + cntx.getJobId() + ", nodeId=" + nodeId + "]";
+        return "[taskId=" + taskSes.getId() + ", jobId=" + cntx.getJobId() + ", nodeId=" +
+            ignite.configuration().getNodeId() + "]";
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/core/src/test/java/org/gridgain/testframework/junits/GridTestResources.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/testframework/junits/GridTestResources.java b/modules/core/src/test/java/org/gridgain/testframework/junits/GridTestResources.java
index 8f8b4a8..8b7acf3 100644
--- a/modules/core/src/test/java/org/gridgain/testframework/junits/GridTestResources.java
+++ b/modules/core/src/test/java/org/gridgain/testframework/junits/GridTestResources.java
@@ -14,7 +14,6 @@ import org.apache.ignite.marshaller.*;
 import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.resources.*;
 import org.apache.ignite.thread.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.kernal.processors.resource.*;
 import org.gridgain.grid.util.typedef.internal.*;
 import org.gridgain.testframework.config.*;
@@ -158,21 +157,8 @@ public class GridTestResources {
     public void inject(Object target) throws IgniteCheckedException {
         assert target != null;
         assert getLogger() != null;
-        assert getNodeId() != null;
-        assert getMBeanServer() != null;
-        assert getGridgainHome() != null;
-
-        ExecutorService execSvc = getExecutorService();
-
-        if (execSvc != null)
-            rsrcProc.injectBasicResource(target, IgniteExecutorServiceResource.class, execSvc);
 
         rsrcProc.injectBasicResource(target, IgniteLoggerResource.class, getLogger().getLogger(target.getClass()));
-        rsrcProc.injectBasicResource(target, IgniteMarshallerResource.class, getMarshaller());
-        rsrcProc.injectBasicResource(target, IgniteLocalNodeIdResource.class, getNodeId());
-        rsrcProc.injectBasicResource(target, IgniteMBeanServerResource.class, getMBeanServer());
-        rsrcProc.injectBasicResource(target, IgniteHomeResource.class, getGridgainHome());
-        rsrcProc.injectBasicResource(target, IgniteLocalHostResource.class, getLocalHost());
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/extdata/p2p/src/main/java/org/gridgain/grid/tests/p2p/GridP2PTestTaskExternalPath1.java
----------------------------------------------------------------------
diff --git a/modules/extdata/p2p/src/main/java/org/gridgain/grid/tests/p2p/GridP2PTestTaskExternalPath1.java b/modules/extdata/p2p/src/main/java/org/gridgain/grid/tests/p2p/GridP2PTestTaskExternalPath1.java
index b9c6e9e..7d7be4b 100644
--- a/modules/extdata/p2p/src/main/java/org/gridgain/grid/tests/p2p/GridP2PTestTaskExternalPath1.java
+++ b/modules/extdata/p2p/src/main/java/org/gridgain/grid/tests/p2p/GridP2PTestTaskExternalPath1.java
@@ -86,10 +86,6 @@ public class GridP2PTestTaskExternalPath1 extends ComputeTaskAdapter<Object, int
         @IgniteUserResource
         private transient GridTestUserResource rsrc;
 
-        /** Local node ID. */
-        @IgniteLocalNodeIdResource
-        private UUID locNodeId;
-
         /** Task session. */
         @IgniteTaskSessionResource
         private ComputeTaskSession ses;
@@ -124,7 +120,7 @@ public class GridP2PTestTaskExternalPath1 extends ComputeTaskAdapter<Object, int
 
         /** {@inheritDoc} */
         @Override public int[] execute() throws IgniteCheckedException {
-            assert locNodeId.equals(argument(0));
+            assert g.configuration().getNodeId().equals(argument(0));
 
             log.info("Running job on node: " + g.cluster().localNode().id());
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/extdata/p2p/src/main/java/org/gridgain/grid/tests/p2p/GridP2PTestTaskExternalPath2.java
----------------------------------------------------------------------
diff --git a/modules/extdata/p2p/src/main/java/org/gridgain/grid/tests/p2p/GridP2PTestTaskExternalPath2.java b/modules/extdata/p2p/src/main/java/org/gridgain/grid/tests/p2p/GridP2PTestTaskExternalPath2.java
index 743eeb6..bfff917 100644
--- a/modules/extdata/p2p/src/main/java/org/gridgain/grid/tests/p2p/GridP2PTestTaskExternalPath2.java
+++ b/modules/extdata/p2p/src/main/java/org/gridgain/grid/tests/p2p/GridP2PTestTaskExternalPath2.java
@@ -86,9 +86,9 @@ public class GridP2PTestTaskExternalPath2 extends ComputeTaskAdapter<Object, int
         @IgniteUserResource
         private transient GridTestUserResource rsrc;
 
-        /** Local node ID. */
-        @IgniteLocalNodeIdResource
-        private UUID locNodeId;
+        /** Ignite instance. */
+        @IgniteInstanceResource
+        private Ignite ignite;
 
         /** Task session. */
         @IgniteTaskSessionResource
@@ -115,7 +115,7 @@ public class GridP2PTestTaskExternalPath2 extends ComputeTaskAdapter<Object, int
          * {@inheritDoc}
          */
         @Override public int[] execute() throws IgniteCheckedException {
-            assert locNodeId.equals(argument(0));
+            assert ignite.configuration().getNodeId().equals(argument(0));
 
             if (sleep) {
                 try {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/hibernate/src/main/java/org/gridgain/grid/cache/store/hibernate/GridCacheHibernateBlobStore.java
----------------------------------------------------------------------
diff --git a/modules/hibernate/src/main/java/org/gridgain/grid/cache/store/hibernate/GridCacheHibernateBlobStore.java b/modules/hibernate/src/main/java/org/gridgain/grid/cache/store/hibernate/GridCacheHibernateBlobStore.java
index 1e8c75c..cfe75a4 100644
--- a/modules/hibernate/src/main/java/org/gridgain/grid/cache/store/hibernate/GridCacheHibernateBlobStore.java
+++ b/modules/hibernate/src/main/java/org/gridgain/grid/cache/store/hibernate/GridCacheHibernateBlobStore.java
@@ -179,9 +179,9 @@ public class GridCacheHibernateBlobStore<K, V> extends GridCacheStoreAdapter<K,
     @IgniteLoggerResource
     private IgniteLogger log;
 
-    /** Marshaller. */
-    @IgniteMarshallerResource
-    private IgniteMarshaller marsh;
+    /** Ignite instance. */
+    @IgniteInstanceResource
+    private Ignite ignite;
 
     /** {@inheritDoc} */
     @SuppressWarnings({"unchecked", "RedundantTypeArguments"})
@@ -536,7 +536,7 @@ public class GridCacheHibernateBlobStore<K, V> extends GridCacheStoreAdapter<K,
      * @throws IgniteCheckedException If failed to convert.
      */
     protected byte[] toBytes(Object obj) throws IgniteCheckedException {
-        return marsh.marshal(obj);
+        return ignite.configuration().getMarshaller().marshal(obj);
     }
 
     /**
@@ -551,6 +551,6 @@ public class GridCacheHibernateBlobStore<K, V> extends GridCacheStoreAdapter<K,
         if (bytes == null || bytes.length == 0)
             return null;
 
-        return marsh.unmarshal(bytes, getClass().getClassLoader());
+        return ignite.configuration().getMarshaller().unmarshal(bytes, getClass().getClassLoader());
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/indexing/src/main/java/org/gridgain/grid/kernal/processors/query/h2/GridH2Indexing.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/gridgain/grid/kernal/processors/query/h2/GridH2Indexing.java b/modules/indexing/src/main/java/org/gridgain/grid/kernal/processors/query/h2/GridH2Indexing.java
index 7307676..d0800c9 100644
--- a/modules/indexing/src/main/java/org/gridgain/grid/kernal/processors/query/h2/GridH2Indexing.java
+++ b/modules/indexing/src/main/java/org/gridgain/grid/kernal/processors/query/h2/GridH2Indexing.java
@@ -124,13 +124,9 @@ public class GridH2Indexing implements GridQueryIndexing {
     @IgniteLoggerResource
     private IgniteLogger log;
 
-    /** Node ID. */
-    @IgniteLocalNodeIdResource
-    private UUID nodeId;
-
-    /** */
-    @IgniteMarshallerResource
-    private IgniteMarshaller marshaller;
+    /** Ignite instance. */
+    @IgniteInstanceResource
+    private Ignite ignite;
 
     /** */
     private GridUnsafeMemory offheap;
@@ -391,7 +387,8 @@ public class GridH2Indexing implements GridQueryIndexing {
     /** {@inheritDoc} */
     @Override public void remove(@Nullable String spaceName, Object key) throws IgniteCheckedException {
         if (log.isDebugEnabled())
-            log.debug("Removing key from cache query index [locId=" + nodeId + ", key=" + key + ']');
+            log.debug("Removing key from cache query index [locId=" + ignite.configuration().getNodeId() +
+                ", key=" + key + ']');
 
         localSpi.set(this);
 
@@ -1187,11 +1184,11 @@ public class GridH2Indexing implements GridQueryIndexing {
     protected JavaObjectSerializer h2Serializer() {
         return new JavaObjectSerializer() {
             @Override public byte[] serialize(Object obj) throws Exception {
-                return marshaller.marshal(obj);
+                return ignite.configuration().getMarshaller().marshal(obj);
             }
 
             @Override public Object deserialize(byte[] bytes) throws Exception {
-                return marshaller.unmarshal(bytes, null);
+                return ignite.configuration().getMarshaller().unmarshal(bytes, null);
             }
         };
     }
@@ -1629,7 +1626,8 @@ public class GridH2Indexing implements GridQueryIndexing {
 
             if (type().valueClass() == String.class) {
                 try {
-                    luceneIdx = new GridLuceneIndex(marshaller, offheap, spaceName, type, true);
+                    luceneIdx = new GridLuceneIndex(ignite.configuration().getMarshaller(),
+                        offheap, spaceName, type, true);
                 }
                 catch (IgniteCheckedException e1) {
                     throw new IgniteException(e1);
@@ -1642,7 +1640,8 @@ public class GridH2Indexing implements GridQueryIndexing {
 
                 if (idx.type() == FULLTEXT) {
                     try {
-                        luceneIdx = new GridLuceneIndex(marshaller, offheap, spaceName, type, true);
+                        luceneIdx = new GridLuceneIndex(ignite.configuration().getMarshaller(),
+                            offheap, spaceName, type, true);
                     }
                     catch (IgniteCheckedException e1) {
                         throw new IgniteException(e1);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/spring/src/test/java/org/gridgain/grid/external/resource/GridAbstractUserExternalResource.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/gridgain/grid/external/resource/GridAbstractUserExternalResource.java b/modules/spring/src/test/java/org/gridgain/grid/external/resource/GridAbstractUserExternalResource.java
index f7df53f..134d34a 100644
--- a/modules/spring/src/test/java/org/gridgain/grid/external/resource/GridAbstractUserExternalResource.java
+++ b/modules/spring/src/test/java/org/gridgain/grid/external/resource/GridAbstractUserExternalResource.java
@@ -39,26 +39,6 @@ public abstract class GridAbstractUserExternalResource {
     private Ignite ignite;
 
     /** */
-    @IgniteLocalNodeIdResource
-    private UUID nodeId;
-
-    /** */
-    @IgniteMBeanServerResource
-    private MBeanServer mbeanSrv;
-
-    /** */
-    @IgniteExecutorServiceResource
-    private ExecutorService exec;
-
-    /** */
-    @IgniteHomeResource
-    private String ggHome;
-
-    /** */
-    @IgniteNameResource
-    private String ggName;
-
-    /** */
     @IgniteSpringApplicationContextResource
     private ApplicationContext springCtx;
 
@@ -75,11 +55,6 @@ public abstract class GridAbstractUserExternalResource {
 
         assert log != null;
         assert ignite != null;
-        assert nodeId != null;
-        assert mbeanSrv != null;
-        assert exec != null;
-        assert ggHome != null;
-        assert ggName != null;
         assert springCtx != null;
 
         log.info("Deploying resource: " + this);
@@ -93,11 +68,6 @@ public abstract class GridAbstractUserExternalResource {
 
         assert log != null;
         assert ignite != null;
-        assert nodeId != null;
-        assert mbeanSrv != null;
-        assert exec != null;
-        assert ggHome != null;
-        assert ggName != null;
         assert springCtx != null;
 
         log.info("Undeploying resource: " + this);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/spring/src/test/java/org/gridgain/grid/external/resource/GridUserExternalResourceTask2.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/gridgain/grid/external/resource/GridUserExternalResourceTask2.java b/modules/spring/src/test/java/org/gridgain/grid/external/resource/GridUserExternalResourceTask2.java
index abf87cb..ec39d6b 100644
--- a/modules/spring/src/test/java/org/gridgain/grid/external/resource/GridUserExternalResourceTask2.java
+++ b/modules/spring/src/test/java/org/gridgain/grid/external/resource/GridUserExternalResourceTask2.java
@@ -111,10 +111,6 @@ public class GridUserExternalResourceTask2 extends ComputeTaskSplitAdapter<Objec
         @IgniteUserResource(resourceName = "rsrc4")
         private transient GridUserExternalResource2 rsrc8;
 
-        /** */
-        @IgniteLocalNodeIdResource
-        private UUID locId;
-
         /** {@inheritDoc} */
         @SuppressWarnings({"ObjectEquality"})
         @Override public Serializable execute() {
@@ -123,7 +119,6 @@ public class GridUserExternalResourceTask2 extends ComputeTaskSplitAdapter<Objec
             assert rsrc3 != null;
             assert rsrc4 != null;
             assert log != null;
-            assert locId != null;
 
             assert rsrc5 != null;
             assert rsrc6 != null;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/spring/src/test/java/org/gridgain/grid/kernal/GridFactorySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/gridgain/grid/kernal/GridFactorySelfTest.java b/modules/spring/src/test/java/org/gridgain/grid/kernal/GridFactorySelfTest.java
index c42d6d2..5cbf218 100644
--- a/modules/spring/src/test/java/org/gridgain/grid/kernal/GridFactorySelfTest.java
+++ b/modules/spring/src/test/java/org/gridgain/grid/kernal/GridFactorySelfTest.java
@@ -615,30 +615,6 @@ public class GridFactorySelfTest extends GridCommonAbstractTest {
         @IgniteLoggerResource
         private IgniteLogger log;
 
-        /** Marshaller. */
-        @IgniteMarshallerResource
-        private IgniteMarshaller marshaller;
-
-        /** Executor. */
-        @IgniteExecutorServiceResource
-        private Executor exec;
-
-        /** MBean server. */
-        @IgniteMBeanServerResource
-        private MBeanServer mbeanSrv;
-
-        /** Grid home. */
-        @IgniteHomeResource
-        private String gridHome;
-
-        /** Grid name. */
-        @IgniteNameResource
-        private String gridName;
-
-        /** Local node ID. */
-        @IgniteLocalNodeIdResource
-        private UUID nodeId;
-
         /** */
         @IgniteSpringApplicationContextResource
         private ApplicationContext appCtx;
@@ -681,14 +657,9 @@ public class GridFactorySelfTest extends GridCommonAbstractTest {
          */
         void checkState(String gridName, boolean exec) {
             assert log != null;
-            assert marshaller != null;
-            assert this.exec != null;
-            assert mbeanSrv != null;
-            assert gridHome != null;
-            assert nodeId != null;
             assert appCtx != null;
 
-            assert F.eq(gridName, this.gridName);
+            assert F.eq(gridName, ignite.name());
 
             if (exec)
                 // Execute any grid method.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridAbstractUserResource.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridAbstractUserResource.java b/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridAbstractUserResource.java
index b1bafd3..68c1f1d 100644
--- a/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridAbstractUserResource.java
+++ b/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridAbstractUserResource.java
@@ -40,26 +40,6 @@ abstract class GridAbstractUserResource {
     private Ignite ignite;
 
     /** */
-    @IgniteLocalNodeIdResource
-    private UUID nodeId;
-
-    /** */
-    @IgniteMBeanServerResource
-    private MBeanServer mbeanSrv;
-
-    /** */
-    @IgniteExecutorServiceResource
-    private ExecutorService exec;
-
-    /** */
-    @IgniteHomeResource
-    private String ggHome;
-
-    /** */
-    @IgniteNameResource
-    private String gridName;
-
-    /** */
     @IgniteSpringApplicationContextResource
     private ApplicationContext springCtx;
 
@@ -95,11 +75,6 @@ abstract class GridAbstractUserResource {
 
         assert log != null;
         assert ignite != null;
-        assert nodeId != null;
-        assert mbeanSrv != null;
-        assert exec != null;
-        assert ggHome != null;
-        assert gridName != null;
         assert springCtx != null;
 
         log.info("Deploying resource: " + this);
@@ -113,11 +88,6 @@ abstract class GridAbstractUserResource {
 
         assert log != null;
         assert ignite != null;
-        assert nodeId != null;
-        assert mbeanSrv != null;
-        assert exec != null;
-        assert ggHome != null;
-        assert gridName != null;
         assert springCtx != null;
 
         log.info("Undeploying resource: " + this);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55936e46/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceEventFilterSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceEventFilterSelfTest.java b/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceEventFilterSelfTest.java
index 1828572..c81db91 100644
--- a/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceEventFilterSelfTest.java
+++ b/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceEventFilterSelfTest.java
@@ -111,11 +111,6 @@ public class GridResourceEventFilterSelfTest extends GridCommonAbstractTest {
         @IgniteUserResource
         private transient UserResource1 rsrc;
 
-        /** Grid ID. */
-        @SuppressWarnings("unused")
-        @IgniteLocalNodeIdResource
-        private UUID gridId;
-
         /** {@inheritDoc} */
         @Override public boolean apply(IgniteEvent evt) {
             return true;


Mime
View raw message