ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [05/41] incubator-ignite git commit: IGNITE-35 Removed IgniteUserResource, IgniteUserResourceOnDeployed, IgniteUserResourceOnUndeployed resources.
Date Fri, 23 Jan 2015 08:47:40 GMT
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ad57f8ed/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 c81db91..deb66a3 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
@@ -106,11 +106,6 @@ public class GridResourceEventFilterSelfTest extends GridCommonAbstractTest {
      */
     @SuppressWarnings({"PublicInnerClass"})
     public static final class CustomEventFilter1 implements IgnitePredicate<IgniteEvent> {
-        /** User resource. */
-        @SuppressWarnings("unused")
-        @IgniteUserResource
-        private transient UserResource1 rsrc;
-
         /** {@inheritDoc} */
         @Override public boolean apply(IgniteEvent evt) {
             return true;
@@ -122,11 +117,6 @@ public class GridResourceEventFilterSelfTest extends GridCommonAbstractTest {
      */
     @SuppressWarnings({"PublicInnerClass"})
     public static final class CustomEventFilter2 implements IgnitePredicate<IgniteEvent> {
-        /** User resource. */
-        @SuppressWarnings("unused")
-        @IgniteUserResource
-        private transient UserResource1 rsrc;
-
         /** Logger. */
         @IgniteLoggerResource
         private IgniteLogger log;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ad57f8ed/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceFieldInjectionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceFieldInjectionSelfTest.java b/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceFieldInjectionSelfTest.java
index 9f3a0de..c6ebe05 100644
--- a/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceFieldInjectionSelfTest.java
+++ b/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceFieldInjectionSelfTest.java
@@ -246,32 +246,6 @@ public class GridResourceFieldInjectionSelfTest extends GridCommonAbstractTest {
         /** */
         @IgniteSpringResource(resourceName = SPRING_BEAN_RSRC_NAME)
         private UserSpringBean springBean;
-
-        /**
-         * Method must be called.
-         * Parent GridAbstractUserResource#deploy() with the same annotation
-         * must be called too.
-         */
-        @SuppressWarnings({"UnusedDeclaration", "unused"})
-        @IgniteUserResourceOnDeployed
-        private void resourceDeploy() {
-            addUsage(deployClss);
-
-            assert springBean != null;
-        }
-
-        /**
-         * Method must be called.
-         * Parent GridAbstractUserResource#undeploy() with the same annotation
-         * must be called too.
-         */
-        @SuppressWarnings({"UnusedDeclaration", "unused"})
-        @IgniteUserResourceOnUndeployed
-        private void resourceUndeploy() {
-            addUsage(undeployClss);
-
-            assert springBean != null;
-        }
     }
 
     /** */
@@ -361,11 +335,6 @@ public class GridResourceFieldInjectionSelfTest extends GridCommonAbstractTest {
      * Task that will always fail due to non-transient resource injection.
      */
     public static class NonTransientUserResourceTask extends ComputeTaskSplitAdapter<Object, Object> {
-        /** */
-        @SuppressWarnings({"UnusedDeclaration", "unused"})
-        @IgniteUserResource(resourceClass = UserResource1.class)
-        private Object rsrc;
-
         /** {@inheritDoc} */
         @Override protected Collection<? extends ComputeJob> split(int gridSize, Object arg) throws IgniteCheckedException {
             // Never reached.
@@ -386,22 +355,6 @@ public class GridResourceFieldInjectionSelfTest extends GridCommonAbstractTest {
     /** */
     public static class UserResourceTask extends ComputeTaskSplitAdapter<Object, Object> {
         /** */
-        @IgniteUserResource(resourceClass = UserResource1.class)
-        private transient Object rsrc1;
-
-        /** */
-        @IgniteUserResource
-        private transient UserResource2 rsrc2;
-
-        /** */
-        @IgniteUserResource(resourceClass = UserResource1.class, resourceName = "rsrc3")
-        private transient Object rsrc3;
-
-        /** */
-        @IgniteUserResource(resourceName = "rsrc4")
-        private transient UserResource2 rsrc4;
-
-        /** */
         @IgniteLoggerResource
         private IgniteLogger log;
 
@@ -435,10 +388,6 @@ public class GridResourceFieldInjectionSelfTest extends GridCommonAbstractTest {
 
         /** {@inheritDoc} */
         @Override protected Collection<ComputeJobAdapter> split(int gridSize, Object arg) throws IgniteCheckedException {
-            assert rsrc1 != null;
-            assert rsrc2 != null;
-            assert rsrc3 != null;
-            assert rsrc4 != null;
             assert log != null;
             assert ignite != null;
             assert springCtx != null;
@@ -451,10 +400,6 @@ public class GridResourceFieldInjectionSelfTest extends GridCommonAbstractTest {
 
             assert gridSize == 2;
 
-            log.info("Injected shared resource1 into task: " + rsrc1);
-            log.info("Injected shared resource2 into task: " + rsrc2);
-            log.info("Injected shared resource3 into task: " + rsrc3);
-            log.info("Injected shared resource4 into task: " + rsrc4);
             log.info("Injected log resource into task: " + log);
             log.info("Injected grid resource into task: " + ignite);
             log.info("Injected spring context resource into task: " + springCtx);
@@ -468,30 +413,6 @@ public class GridResourceFieldInjectionSelfTest extends GridCommonAbstractTest {
             for (int i = 0; i < gridSize; i++) {
                 jobs.add(new ComputeJobAdapter() {
                     /** */
-                    @IgniteUserResource(resourceClass = UserResource3.class)
-                    private transient GridAbstractUserResource rsrc5;
-
-                    /** */
-                    @IgniteUserResource
-                    private transient UserResource4 rsrc6;
-
-                    /** */
-                    @IgniteUserResource
-                    private transient UserResource5 rsrc7;
-
-                    /** */
-                    @IgniteUserResource(resourceClass = UserResource3.class, resourceName = "rsrc8")
-                    private transient GridAbstractUserResource rsrc8;
-
-                    /** */
-                    @IgniteUserResource(resourceName = "rsrc9")
-                    private transient UserResource4 rsrc9;
-
-                    /** */
-                    @IgniteUserResource(resourceName = "rsrc10")
-                    private transient UserResource5 rsrc10;
-
-                    /** */
                     @IgniteSpringResource(resourceName = SPRING_BEAN_RSRC_NAME)
                     private transient UserSpringBean springBean2;
 
@@ -501,10 +422,6 @@ public class GridResourceFieldInjectionSelfTest extends GridCommonAbstractTest {
 
                     /** {@inheritDoc} */
                     @Override public Serializable execute() {
-                        assert rsrc1 != null;
-                        assert rsrc2 != null;
-                        assert rsrc3 != null;
-                        assert rsrc4 != null;
                         assert log != null;
                         assert ignite != null;
                         assert springCtx != null;
@@ -514,23 +431,6 @@ public class GridResourceFieldInjectionSelfTest extends GridCommonAbstractTest {
                         assert jobCtx != null;
                         assert outerJobCtx == null;
 
-                        assert rsrc5 != null;
-                        assert rsrc6 != null;
-                        assert rsrc7 != null;
-                        assert rsrc8 != null;
-                        assert rsrc9 != null;
-                        assert rsrc10 != null;
-
-                        log.info("Injected shared resource1 into job: " + rsrc1);
-                        log.info("Injected shared resource2 into job: " + rsrc2);
-                        log.info("Injected shared resource3 into job: " + rsrc3);
-                        log.info("Injected shared resource4 into job: " + rsrc4);
-                        log.info("Injected shared resource5 into job: " + rsrc5);
-                        log.info("Injected shared resource6 into job: " + rsrc6);
-                        log.info("Injected shared resource7 into job: " + rsrc7);
-                        log.info("Injected shared resource8 into job: " + rsrc8);
-                        log.info("Injected shared resource9 into job: " + rsrc9);
-                        log.info("Injected shared resource10 into job: " + rsrc10);
                         log.info("Injected log resource into job: " + log);
                         log.info("Injected grid resource into job: " + ignite);
                         log.info("Injected spring context resource into job: " + springCtx);
@@ -549,10 +449,6 @@ public class GridResourceFieldInjectionSelfTest extends GridCommonAbstractTest {
 
         /** {@inheritDoc} */
         @Override public Object reduce(List<ComputeJobResult> results) throws IgniteCheckedException {
-            assert rsrc1 != null;
-            assert rsrc2 != null;
-            assert rsrc3 != null;
-            assert rsrc4 != null;
             assert log != null;
             assert ignite != null;
             assert springCtx != null;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ad57f8ed/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceFieldOverrideInjectionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceFieldOverrideInjectionSelfTest.java b/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceFieldOverrideInjectionSelfTest.java
index 01ee9b7..d46f0c4 100644
--- a/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceFieldOverrideInjectionSelfTest.java
+++ b/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceFieldOverrideInjectionSelfTest.java
@@ -94,10 +94,6 @@ public class GridResourceFieldOverrideInjectionSelfTest extends GridCommonAbstra
         private IgniteLogger log;
 
         /** */
-        @IgniteUserResource
-        private transient UserResource rsrc;
-
-        /** */
         @IgniteSpringResource(resourceName = SPRING_BEAN_RSRC_NAME)
         private transient UserSpringBean springBean;
 
@@ -112,14 +108,12 @@ public class GridResourceFieldOverrideInjectionSelfTest extends GridCommonAbstra
         /** {@inheritDoc} */
         @Override protected Collection<? extends ComputeJob> split(int gridSize, Object arg) throws IgniteCheckedException {
             assert log != null;
-            assert rsrc != null;
             assert springBean != null;
 
             // Job context is job resource, not task resource.
             assert jobCtx == null;
 
             log.info("Injected logger into task: " + log);
-            log.info("Injected shared resource into task: " + rsrc);
             log.info("Injected session into task: " + ses);
             log.info("Injected spring bean into task: " + springBean);
 
@@ -128,10 +122,6 @@ public class GridResourceFieldOverrideInjectionSelfTest extends GridCommonAbstra
             for (int i = 0; i < gridSize; i++) {
                 jobs.add(new ComputeJobAdapter() {
                     /** */
-                    @IgniteUserResource
-                    private transient UserResource rsrc;
-
-                    /** */
                     @IgniteLoggerResource
                     private IgniteLogger log;
 
@@ -151,23 +141,19 @@ public class GridResourceFieldOverrideInjectionSelfTest extends GridCommonAbstra
                     @SuppressWarnings({"ObjectEquality"})
                     @Override public Serializable execute() {
                         assert log != null;
-                        assert rsrc != null;
                         assert jobSpringBean != null;
 
                         assert ResourceOverrideTask.this.log != null;
-                        assert ResourceOverrideTask.this.rsrc != null;
                         //Job context is never setup on the task.
                         assert ResourceOverrideTask.this.jobCtx == null;
 
                         assert springBean != null;
 
-                        assert rsrc == ResourceOverrideTask.this.rsrc;
                         assert ses == ResourceOverrideTask.this.ses;
                         assert jobCtx != null;
                         assert jobSpringBean == springBean;
 
                         log.info("Injected logger into job: " + log);
-                        log.info("Injected shared resource into job: " + rsrc);
                         log.info("Injected session into job: " + ses);
                         log.info("Injected spring bean into job: " + jobSpringBean);
 
@@ -182,7 +168,6 @@ public class GridResourceFieldOverrideInjectionSelfTest extends GridCommonAbstra
         /** {@inheritDoc} */
         @Override public Object reduce(List<ComputeJobResult> results) throws IgniteCheckedException {
             assert log != null;
-            assert rsrc != null;
 
             // Job context is job resource, not task resource.
             assert jobCtx == null;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ad57f8ed/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceIocSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceIocSelfTest.java b/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceIocSelfTest.java
index 903f7e2..65975f4 100644
--- a/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceIocSelfTest.java
+++ b/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceIocSelfTest.java
@@ -245,25 +245,13 @@ public class GridResourceIocSelfTest extends GridCommonAbstractTest {
     @SuppressWarnings({"PublicInnerClass"})
     @ComputeTaskName("TestTask")
     public static class TestTask extends ComputeTaskSplitAdapter<Object, Void> {
-        /** User resource. */
-        @IgniteUserResource
-        private transient UserResource1 rsrc1;
-
         /** {@inheritDoc} */
         @Override protected Collection<ComputeJobAdapter> split(int gridSize, Object arg) throws IgniteCheckedException {
-            assert rsrc1 != null;
-
             Collection<ComputeJobAdapter> jobs = new ArrayList<>(gridSize);
 
             for (int i = 0; i < gridSize; i++) {
                 jobs.add(new ComputeJobAdapter() {
-                    /** User resource */
-                    @IgniteUserResource
-                    private transient UserResource1 rsrc2;
-
                     @Override public Serializable execute() {
-                        assert rsrc2 != null;
-
                         return null;
                     }
                 });
@@ -285,78 +273,6 @@ public class GridResourceIocSelfTest extends GridCommonAbstractTest {
     }
 
     /**
-     * Task that will always fail due to non-transient resource injection.
-     */
-    @SuppressWarnings({"PublicInnerClass"})
-    public static class UserResourceTask extends ComputeTaskSplitAdapter<Object, Object> {
-        /** */
-        @IgniteUserResource(resourceClass = UserResource1.class)
-        private transient Object rsrc1;
-
-        /** {@inheritDoc} */
-        @Nullable
-        @Override protected Collection<ComputeJobAdapter> split(int gridSize, Object arg) throws IgniteCheckedException {
-            assert rsrc1 != null;
-
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Override public Object reduce(List<ComputeJobResult> results) throws IgniteCheckedException {
-            assert rsrc1 != null;
-
-            // Nothing to reduce.
-            return null;
-        }
-
-        /**
-         * @return Resource of anonymous class.
-         */
-        public UserResource2 createAnonymousResource() {
-            return new UserResource2() {
-                // No-op.
-            };
-        }
-
-        /** */
-        private static class UserResource2 extends GridAbstractUserResource {
-            // No-op.
-        }
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testIoc() throws Exception {
-        GridResourceIoc ioc = new GridResourceIoc();
-
-        UserResourceTask task = new UserResourceTask();
-
-        GridDeployment dep = new GridTestDeployment(IgniteDeploymentMode.PRIVATE, task.getClass().getClassLoader(),
-            IgniteUuid.randomUuid(), "", task.getClass().getName(), false);
-
-        dep.addDeployedClass(task.getClass());
-
-        UserResourceTask.UserResource2 rsrc;
-
-        // Nullable caching key.
-        ioc.inject(rsrc = task.createAnonymousResource(), IgniteUserResource.class,
-            new GridResourceBasicInjector<>(null), dep, task.getClass());
-
-        info("Injected resources.");
-
-        ioc.onUndeployed(UserResourceTask.class.getClassLoader());
-
-        info("Cleanup resources.");
-
-        for (Class<?> cls = UserResourceTask.class; !cls.equals(Object.class); cls = cls.getSuperclass())
-            assert !ioc.isCached(cls) : "Class must be removed from cache: " + cls.getName();
-
-        for (Class<?> cls = rsrc.getClass(); !cls.equals(Object.class); cls = cls.getSuperclass())
-            assert !ioc.isCached(cls) : "Class must be removed from cache: " + cls.getName();
-    }
-
-    /**
      * Test GridDeploymentMode.PRIVATE mode.
      *
      * @throws Exception if error occur.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ad57f8ed/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceIsolatedClassLoaderSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceIsolatedClassLoaderSelfTest.java b/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceIsolatedClassLoaderSelfTest.java
index 16824aa..e30d9ec 100644
--- a/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceIsolatedClassLoaderSelfTest.java
+++ b/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceIsolatedClassLoaderSelfTest.java
@@ -295,45 +295,16 @@ public class GridResourceIsolatedClassLoaderSelfTest extends GridCommonAbstractT
 
     /** */
     public static class SharedResourceTask1 extends ComputeTaskSplitAdapter<Object, Object> {
-        /** User resource.  */
-        @IgniteUserResource(resourceClass = UserResource1.class)
-        private transient GridAbstractUserResource rsrc1;
-
-        /** User resource. */
-        @IgniteUserResource
-        private transient UserResource2 rsrc2;
-
-        /** User resource.  */
-        @IgniteUserResource(resourceClass = UserResource1.class, resourceName = "rsrc3")
-        private transient GridAbstractUserResource rsrc3;
-
-        /** User resource. */
-        @IgniteUserResource(resourceName = "rsrc4")
-        private transient UserResource2 rsrc4;
-
         /** */
         @IgniteLoggerResource
         private IgniteLogger log;
 
         /** {@inheritDoc} */
         @Override protected Collection<ComputeJobAdapter> split(int gridSize, Object arg) throws IgniteCheckedException {
-            assert rsrc1 != null;
-            assert rsrc2 != null;
-            assert rsrc3 != null;
-            assert rsrc4 != null;
             assert log != null;
 
-            log.info("Injected shared resource1 into task: " + rsrc1);
-            log.info("Injected shared resource2 into task: " + rsrc2);
-            log.info("Injected shared resource3 into task: " + rsrc3);
-            log.info("Injected shared resource4 into task: " + rsrc4);
             log.info("Injected log resource into task: " + log);
 
-            task1Rsrc1 = rsrc1;
-            task1Rsrc2 = rsrc2;
-            task1Rsrc3 = rsrc3;
-            task1Rsrc4 = rsrc4;
-
             Collection<ComputeJobAdapter> jobs = new ArrayList<>(gridSize);
 
             for (int i = 0; i < gridSize; i++)
@@ -344,10 +315,6 @@ public class GridResourceIsolatedClassLoaderSelfTest extends GridCommonAbstractT
 
         /** {@inheritDoc} */
         @Override public Object reduce(List<ComputeJobResult> results) throws IgniteCheckedException {
-            assert rsrc1 != null;
-            assert rsrc2 != null;
-            assert rsrc3 != null;
-            assert rsrc4 != null;
             assert log != null;
 
             // Nothing to reduce.
@@ -359,51 +326,11 @@ public class GridResourceIsolatedClassLoaderSelfTest extends GridCommonAbstractT
          * access when loading class with different class loader.
          */
         public final class GridSharedJob1 extends ComputeJobAdapter {
-            /** User resource. */
-            @IgniteUserResource(resourceClass = UserResource1.class)
-            private transient GridAbstractUserResource rsrc5;
-
-            /** Global resource. */
-            @IgniteUserResource
-            private transient UserResource2 rsrc6;
-
-            /** User resource. */
-            @IgniteUserResource(resourceClass = UserResource1.class, resourceName = "rsrc3")
-            private transient GridAbstractUserResource rsrc7;
-
-            /** Global resource. */
-            @IgniteUserResource(resourceName = "rsrc4")
-            private transient UserResource2 rsrc8;
-
             /** {@inheritDoc} */
             @SuppressWarnings({"ObjectEquality"})
             @Override public Serializable execute() {
-                assert rsrc1 != null;
-                assert rsrc2 != null;
-                assert rsrc3 != null;
-                assert rsrc4 != null;
                 assert log != null;
 
-                assert rsrc5 != null;
-                assert rsrc6 != null;
-                assert rsrc7 != null;
-                assert rsrc8 != null;
-
-                // Make sure that neither task nor global scope got
-                // created more than once.
-                assert rsrc1 == rsrc5;
-                assert rsrc2 == rsrc6;
-                assert rsrc3 == rsrc7;
-                assert rsrc4 == rsrc8;
-
-                log.info("Injected shared resource1 into job: " + rsrc1);
-                log.info("Injected shared resource2 into job: " + rsrc2);
-                log.info("Injected shared resource3 into job: " + rsrc3);
-                log.info("Injected shared resource4 into job: " + rsrc4);
-                log.info("Injected shared resource5 into job: " + rsrc5);
-                log.info("Injected shared resource6 into job: " + rsrc6);
-                log.info("Injected shared resource7 into job: " + rsrc7);
-                log.info("Injected shared resource8 into job: " + rsrc8);
                 log.info("Injected log resource into job: " + log);
 
                 return null;
@@ -413,94 +340,25 @@ public class GridResourceIsolatedClassLoaderSelfTest extends GridCommonAbstractT
 
     /** */
     public static class SharedResourceTask2 extends ComputeTaskSplitAdapter<Object, Object> {
-        /** User resource.  */
-        @IgniteUserResource(resourceClass = UserResource1.class)
-        private transient GridAbstractUserResource rsrc1;
-
-        /** User resource. */
-        @IgniteUserResource
-        private transient UserResource2 rsrc2;
-
-        /** User resource.  */
-        @IgniteUserResource(resourceClass = UserResource1.class, resourceName = "rsrc3")
-        private transient GridAbstractUserResource rsrc3;
-
-        /** User resource. */
-        @IgniteUserResource(resourceName = "rsrc4")
-        private transient UserResource2 rsrc4;
-
         /** */
         @IgniteLoggerResource
         private IgniteLogger log;
 
         /** {@inheritDoc} */
         @Override protected Collection<ComputeJobAdapter> split(int gridSize, Object arg) throws IgniteCheckedException {
-            assert rsrc1 != null;
-            assert rsrc2 != null;
-            assert rsrc3 != null;
-            assert rsrc4 != null;
             assert log != null;
 
-            log.info("Injected shared resource1 into task: " + rsrc1);
-            log.info("Injected shared resource2 into task: " + rsrc2);
-            log.info("Injected shared resource3 into task: " + rsrc3);
-            log.info("Injected shared resource4 into task: " + rsrc4);
             log.info("Injected log resource into task: " + log);
 
-            task2Rsrc1 = rsrc1;
-            task2Rsrc2 = rsrc2;
-            task2Rsrc3 = rsrc3;
-            task2Rsrc4 = rsrc4;
-
             Collection<ComputeJobAdapter> jobs = new ArrayList<>(gridSize);
 
             for (int i = 0; i < gridSize; i++) {
                 jobs.add(new ComputeJobAdapter() {
-                    /** User resource. */
-                    @IgniteUserResource(resourceClass = UserResource1.class)
-                    private transient GridAbstractUserResource rsrc5;
-
-                    /** User resource */
-                    @IgniteUserResource
-                    private transient UserResource2 rsrc6;
-
-                    /** User resource. */
-                    @IgniteUserResource(resourceClass = UserResource1.class, resourceName = "rsrc3")
-                    private transient GridAbstractUserResource rsrc7;
-
-                    /** User resource */
-                    @IgniteUserResource(resourceName = "rsrc4")
-                    private transient UserResource2 rsrc8;
-
                     /** {@inheritDoc} */
                     @SuppressWarnings({"ObjectEquality"})
                     @Override public Serializable execute() {
-                        assert rsrc1 != null;
-                        assert rsrc2 != null;
-                        assert rsrc3 != null;
-                        assert rsrc4 != null;
                         assert log != null;
 
-                        assert rsrc5 != null;
-                        assert rsrc6 != null;
-                        assert rsrc7 != null;
-                        assert rsrc8 != null;
-
-                        // Make sure that neither task nor global scope got
-                        // created more than once.
-                        assert rsrc1 == rsrc5;
-                        assert rsrc2 == rsrc6;
-                        assert rsrc3 == rsrc7;
-                        assert rsrc4 == rsrc8;
-
-                        log.info("Injected shared resource1 into job: " + rsrc1);
-                        log.info("Injected shared resource2 into job: " + rsrc2);
-                        log.info("Injected shared resource3 into job: " + rsrc3);
-                        log.info("Injected shared resource4 into job: " + rsrc4);
-                        log.info("Injected shared resource5 into job: " + rsrc5);
-                        log.info("Injected shared resource6 into job: " + rsrc6);
-                        log.info("Injected shared resource7 into job: " + rsrc7);
-                        log.info("Injected shared resource8 into job: " + rsrc8);
                         log.info("Injected log resource into job: " + log);
 
                         return null;
@@ -513,10 +371,6 @@ public class GridResourceIsolatedClassLoaderSelfTest extends GridCommonAbstractT
 
         /** {@inheritDoc} */
         @Override public Object reduce(List<ComputeJobResult> results) throws IgniteCheckedException {
-            assert rsrc1 != null;
-            assert rsrc2 != null;
-            assert rsrc3 != null;
-            assert rsrc4 != null;
             assert log != null;
 
             // Nothing to reduce.
@@ -527,94 +381,25 @@ public class GridResourceIsolatedClassLoaderSelfTest extends GridCommonAbstractT
     /** */
     @ComputeTaskName("name")
     public static class SharedResourceTask3 extends ComputeTaskSplitAdapter<Object, Object> {
-        /** User resource.  */
-        @IgniteUserResource(resourceClass = UserResource1.class)
-        private transient GridAbstractUserResource rsrc1;
-
-        /** User resource. */
-        @IgniteUserResource
-        private transient UserResource2 rsrc2;
-
-        /** User resource.  */
-        @IgniteUserResource(resourceClass = UserResource1.class, resourceName = "rsrc3")
-        private transient GridAbstractUserResource rsrc3;
-
-        /** User resource. */
-        @IgniteUserResource(resourceName = "rsrc4")
-        private transient UserResource2 rsrc4;
-
         /** */
         @IgniteLoggerResource
         private IgniteLogger log;
 
         /** {@inheritDoc} */
         @Override protected Collection<ComputeJobAdapter> split(int gridSize, Object arg) throws IgniteCheckedException {
-            assert rsrc1 != null;
-            assert rsrc2 != null;
-            assert rsrc3 != null;
-            assert rsrc4 != null;
             assert log != null;
 
-            log.info("Injected shared resource1 into task: " + rsrc1);
-            log.info("Injected shared resource2 into task: " + rsrc2);
-            log.info("Injected shared resource3 into task: " + rsrc3);
-            log.info("Injected shared resource4 into task: " + rsrc4);
             log.info("Injected log resource into task: " + log);
 
-            task2Rsrc1 = rsrc1;
-            task2Rsrc2 = rsrc2;
-            task2Rsrc3 = rsrc3;
-            task2Rsrc4 = rsrc4;
-
             Collection<ComputeJobAdapter> jobs = new ArrayList<>(gridSize);
 
             for (int i = 0; i < gridSize; i++) {
                 jobs.add(new ComputeJobAdapter() {
-                    /** User resource. */
-                    @IgniteUserResource(resourceClass = UserResource1.class)
-                    private transient GridAbstractUserResource rsrc5;
-
-                    /** User resource */
-                    @IgniteUserResource
-                    private transient UserResource2 rsrc6;
-
-                    /** User resource. */
-                    @IgniteUserResource(resourceClass = UserResource1.class, resourceName = "rsrc3")
-                    private transient GridAbstractUserResource rsrc7;
-
-                    /** User resource */
-                    @IgniteUserResource(resourceName = "rsrc4")
-                    private transient UserResource2 rsrc8;
-
                     /** {@inheritDoc} */
                     @SuppressWarnings({"ObjectEquality"})
                     @Override public Serializable execute() {
-                        assert rsrc1 != null;
-                        assert rsrc2 != null;
-                        assert rsrc3 != null;
-                        assert rsrc4 != null;
                         assert log != null;
 
-                        assert rsrc5 != null;
-                        assert rsrc6 != null;
-                        assert rsrc7 != null;
-                        assert rsrc8 != null;
-
-                        // Make sure that neither task nor global scope got
-                        // created more than once.
-                        assert rsrc1 == rsrc5;
-                        assert rsrc2 == rsrc6;
-                        assert rsrc3 == rsrc7;
-                        assert rsrc4 == rsrc8;
-
-                        log.info("Injected shared resource1 into job: " + rsrc1);
-                        log.info("Injected shared resource2 into job: " + rsrc2);
-                        log.info("Injected shared resource3 into job: " + rsrc3);
-                        log.info("Injected shared resource4 into job: " + rsrc4);
-                        log.info("Injected shared resource5 into job: " + rsrc5);
-                        log.info("Injected shared resource6 into job: " + rsrc6);
-                        log.info("Injected shared resource7 into job: " + rsrc7);
-                        log.info("Injected shared resource8 into job: " + rsrc8);
                         log.info("Injected log resource into job: " + log);
 
                         return null;
@@ -627,10 +412,6 @@ public class GridResourceIsolatedClassLoaderSelfTest extends GridCommonAbstractT
 
         /** {@inheritDoc} */
         @Override public Object reduce(List<ComputeJobResult> results) throws IgniteCheckedException {
-            assert rsrc1 != null;
-            assert rsrc2 != null;
-            assert rsrc3 != null;
-            assert rsrc4 != null;
             assert log != null;
 
             // Nothing to reduce.
@@ -640,95 +421,25 @@ public class GridResourceIsolatedClassLoaderSelfTest extends GridCommonAbstractT
 
     /** */
     @ComputeTaskName("name")
-    public static class SharedResourceTask4 extends ComputeTaskSplitAdapter<Object, Object> {
-        /** User resource.  */
-        @IgniteUserResource(resourceClass = UserResource1.class)
-        private transient GridAbstractUserResource rsrc1;
-
-        /** User resource. */
-        @IgniteUserResource
-        private transient UserResource2 rsrc2;
-
-        /** User resource.  */
-        @IgniteUserResource(resourceClass = UserResource1.class, resourceName = "rsrc3")
-        private transient GridAbstractUserResource rsrc3;
-
-        /** User resource. */
-        @IgniteUserResource(resourceName = "rsrc4")
-        private transient UserResource2 rsrc4;
-
-        /** */
+    public static class SharedResourceTask4 extends ComputeTaskSplitAdapter<Object, Object> {        /** */
         @IgniteLoggerResource
         private IgniteLogger log;
 
         /** {@inheritDoc} */
         @Override protected Collection<ComputeJobAdapter> split(int gridSize, Object arg) throws IgniteCheckedException {
-            assert rsrc1 != null;
-            assert rsrc2 != null;
-            assert rsrc3 != null;
-            assert rsrc4 != null;
             assert log != null;
 
-            log.info("Injected shared resource1 into task: " + rsrc1);
-            log.info("Injected shared resource2 into task: " + rsrc2);
-            log.info("Injected shared resource3 into task: " + rsrc3);
-            log.info("Injected shared resource4 into task: " + rsrc4);
             log.info("Injected log resource into task: " + log);
 
-            task2Rsrc1 = rsrc1;
-            task2Rsrc2 = rsrc2;
-            task2Rsrc3 = rsrc3;
-            task2Rsrc4 = rsrc4;
-
             Collection<ComputeJobAdapter> jobs = new ArrayList<>(gridSize);
 
             for (int i = 0; i < gridSize; i++) {
                 jobs.add(new ComputeJobAdapter() {
-                    /** User resource. */
-                    @IgniteUserResource(resourceClass = UserResource1.class)
-                    private transient GridAbstractUserResource rsrc5;
-
-                    /** User resource */
-                    @IgniteUserResource
-                    private transient UserResource2 rsrc6;
-
-                    /** User resource. */
-                    @IgniteUserResource(resourceClass = UserResource1.class, resourceName = "rsrc3")
-                    private transient GridAbstractUserResource rsrc7;
-
-                    /** User resource */
-                    @IgniteUserResource(resourceName = "rsrc4")
-                    private transient UserResource2 rsrc8;
-
                     /** {@inheritDoc} */
                     @SuppressWarnings({"ObjectEquality"})
                     @Override public Serializable execute() {
-                        assert rsrc1 != null;
-                        assert rsrc2 != null;
-                        assert rsrc3 != null;
-                        assert rsrc4 != null;
                         assert log != null;
 
-                        assert rsrc5 != null;
-                        assert rsrc6 != null;
-                        assert rsrc7 != null;
-                        assert rsrc8 != null;
-
-                        // Make sure that neither task nor global scope got
-                        // created more than once.
-                        assert rsrc1 == rsrc5;
-                        assert rsrc2 == rsrc6;
-                        assert rsrc3 == rsrc7;
-                        assert rsrc4 == rsrc8;
-
-                        log.info("Injected shared resource1 into job: " + rsrc1);
-                        log.info("Injected shared resource2 into job: " + rsrc2);
-                        log.info("Injected shared resource3 into job: " + rsrc3);
-                        log.info("Injected shared resource4 into job: " + rsrc4);
-                        log.info("Injected shared resource5 into job: " + rsrc5);
-                        log.info("Injected shared resource6 into job: " + rsrc6);
-                        log.info("Injected shared resource7 into job: " + rsrc7);
-                        log.info("Injected shared resource8 into job: " + rsrc8);
                         log.info("Injected log resource into job: " + log);
 
                         return null;
@@ -741,10 +452,6 @@ public class GridResourceIsolatedClassLoaderSelfTest extends GridCommonAbstractT
 
         /** {@inheritDoc} */
         @Override public Object reduce(List<ComputeJobResult> results) throws IgniteCheckedException {
-            assert rsrc1 != null;
-            assert rsrc2 != null;
-            assert rsrc3 != null;
-            assert rsrc4 != null;
             assert log != null;
 
             // Nothing to reduce.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ad57f8ed/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceIsolatedTaskSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceIsolatedTaskSelfTest.java b/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceIsolatedTaskSelfTest.java
index 5391267..22eeb13 100644
--- a/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceIsolatedTaskSelfTest.java
+++ b/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceIsolatedTaskSelfTest.java
@@ -275,45 +275,16 @@ public class GridResourceIsolatedTaskSelfTest extends GridCommonAbstractTest {
 
     /** */
     public static class SharedResourceTask1 extends ComputeTaskSplitAdapter<Object, Object> {
-        /** User resource. */
-        @IgniteUserResource(resourceClass = UserResource1.class)
-        private transient GridAbstractUserResource rsrc1;
-
-        /** User resource. */
-        @IgniteUserResource
-        private transient UserResource2 rsrc2;
-
-        /** User resource.  */
-        @IgniteUserResource(resourceClass = UserResource1.class, resourceName = "rsrc3")
-        private transient GridAbstractUserResource rsrc3;
-
-        /** User resource. */
-        @IgniteUserResource(resourceName = "rsrc4")
-        private transient UserResource2 rsrc4;
-
         /** */
         @IgniteLoggerResource
         private IgniteLogger log;
 
         /** {@inheritDoc} */
         @Override protected Collection<ComputeJobAdapter> split(int gridSize, Object arg) throws IgniteCheckedException {
-            assert rsrc1 != null;
-            assert rsrc2 != null;
-            assert rsrc3 != null;
-            assert rsrc4 != null;
             assert log != null;
 
-            log.info("Injected shared resource1 into task: " + rsrc1);
-            log.info("Injected shared resource2 into task: " + rsrc2);
-            log.info("Injected shared resource3 into task: " + rsrc3);
-            log.info("Injected shared resource4 into task: " + rsrc4);
             log.info("Injected log resource into task: " + log);
 
-            task1Rsrc1 = rsrc1;
-            task1Rsrc2 = rsrc2;
-            task1Rsrc3 = rsrc3;
-            task1Rsrc4 = rsrc4;
-
             Collection<ComputeJobAdapter> jobs = new ArrayList<>(gridSize);
 
             for (int i = 0; i < gridSize; i++)
@@ -324,10 +295,6 @@ public class GridResourceIsolatedTaskSelfTest extends GridCommonAbstractTest {
 
         /** {@inheritDoc} */
         @Override public Object reduce(List<ComputeJobResult> results) throws IgniteCheckedException {
-            assert rsrc1 != null;
-            assert rsrc2 != null;
-            assert rsrc3 != null;
-            assert rsrc4 != null;
             assert log != null;
 
             // Nothing to reduce.
@@ -339,51 +306,11 @@ public class GridResourceIsolatedTaskSelfTest extends GridCommonAbstractTest {
          * access when loading class with different class loader.
          */
         public final class GridSharedJob1 extends ComputeJobAdapter {
-            /** User resource. */
-            @IgniteUserResource(resourceClass = UserResource1.class)
-            private transient GridAbstractUserResource rsrc5;
-
-            /** Global resource. */
-            @IgniteUserResource
-            private transient UserResource2 rsrc6;
-
-            /** User resource. */
-            @IgniteUserResource(resourceClass = UserResource1.class, resourceName = "rsrc3")
-            private transient GridAbstractUserResource rsrc7;
-
-            /** Global resource. */
-            @IgniteUserResource(resourceName = "rsrc4")
-            private transient UserResource2 rsrc8;
-
             /** {@inheritDoc} */
             @SuppressWarnings({"ObjectEquality"})
             @Override public Serializable execute() {
-                assert rsrc1 != null;
-                assert rsrc2 != null;
-                assert rsrc3 != null;
-                assert rsrc4 != null;
                 assert log != null;
 
-                assert rsrc5 != null;
-                assert rsrc6 != null;
-                assert rsrc7 != null;
-                assert rsrc8 != null;
-
-                // Make sure that neither task nor global scope got
-                // created more than once.
-                assert rsrc1 == rsrc5;
-                assert rsrc2 == rsrc6;
-                assert rsrc3 == rsrc7;
-                assert rsrc4 == rsrc8;
-
-                log.info("Injected shared resource1 into job: " + rsrc1);
-                log.info("Injected shared resource2 into job: " + rsrc2);
-                log.info("Injected shared resource3 into job: " + rsrc3);
-                log.info("Injected shared resource4 into job: " + rsrc4);
-                log.info("Injected shared resource5 into job: " + rsrc5);
-                log.info("Injected shared resource6 into job: " + rsrc6);
-                log.info("Injected shared resource7 into job: " + rsrc7);
-                log.info("Injected shared resource8 into job: " + rsrc8);
                 log.info("Injected log resource into job: " + log);
 
                 return null;
@@ -393,94 +320,25 @@ public class GridResourceIsolatedTaskSelfTest extends GridCommonAbstractTest {
 
     /** */
     public static class SharedResourceTask2 extends ComputeTaskSplitAdapter<Object, Object> {
-        /** User resource. */
-        @IgniteUserResource(resourceClass = UserResource1.class)
-        private transient GridAbstractUserResource rsrc1;
-
-        /** User resource. */
-        @IgniteUserResource
-        private transient UserResource2 rsrc2;
-
-        /** User resource. */
-        @IgniteUserResource(resourceClass = UserResource1.class, resourceName = "rsrc3")
-        private transient GridAbstractUserResource rsrc3;
-
-        /** User resource. */
-        @IgniteUserResource(resourceName = "rsrc4")
-        private transient UserResource2 rsrc4;
-
         /** */
         @IgniteLoggerResource
         private IgniteLogger log;
 
         /** {@inheritDoc} */
         @Override protected Collection<ComputeJobAdapter> split(int gridSize, Object arg) throws IgniteCheckedException {
-            assert rsrc1 != null;
-            assert rsrc2 != null;
-            assert rsrc3 != null;
-            assert rsrc4 != null;
             assert log != null;
 
-            log.info("Injected shared resource1 into task: " + rsrc1);
-            log.info("Injected shared resource2 into task: " + rsrc2);
-            log.info("Injected shared resource3 into task: " + rsrc3);
-            log.info("Injected shared resource4 into task: " + rsrc4);
             log.info("Injected log resource into task: " + log);
 
-            task2Rsrc1 = rsrc1;
-            task2Rsrc2 = rsrc2;
-            task2Rsrc3 = rsrc3;
-            task2Rsrc4 = rsrc4;
-
             Collection<ComputeJobAdapter> jobs = new ArrayList<>(gridSize);
 
             for (int i = 0; i < gridSize; i++) {
                 jobs.add(new ComputeJobAdapter() {
-                    /** User resource. */
-                    @IgniteUserResource(resourceClass = UserResource1.class)
-                    private transient GridAbstractUserResource rsrc5;
-
-                    /** User resource */
-                    @IgniteUserResource
-                    private transient UserResource2 rsrc6;
-
-                    /** User resource. */
-                    @IgniteUserResource(resourceClass = UserResource1.class, resourceName = "rsrc3")
-                    private transient GridAbstractUserResource rsrc7;
-
-                    /** User resource */
-                    @IgniteUserResource(resourceName = "rsrc4")
-                    private transient UserResource2 rsrc8;
-
                     /** {@inheritDoc} */
                     @SuppressWarnings({"ObjectEquality"})
                     @Override public Serializable execute() {
-                        assert rsrc1 != null;
-                        assert rsrc2 != null;
-                        assert rsrc3 != null;
-                        assert rsrc4 != null;
                         assert log != null;
 
-                        assert rsrc5 != null;
-                        assert rsrc6 != null;
-                        assert rsrc7 != null;
-                        assert rsrc8 != null;
-
-                        // Make sure that neither task nor global scope got
-                        // created more than once.
-                        assert rsrc1 == rsrc5;
-                        assert rsrc2 == rsrc6;
-                        assert rsrc3 == rsrc7;
-                        assert rsrc4 == rsrc8;
-
-                        log.info("Injected shared resource1 into job: " + rsrc1);
-                        log.info("Injected shared resource2 into job: " + rsrc2);
-                        log.info("Injected shared resource3 into job: " + rsrc3);
-                        log.info("Injected shared resource4 into job: " + rsrc4);
-                        log.info("Injected shared resource5 into job: " + rsrc5);
-                        log.info("Injected shared resource6 into job: " + rsrc6);
-                        log.info("Injected shared resource7 into job: " + rsrc7);
-                        log.info("Injected shared resource8 into job: " + rsrc8);
                         log.info("Injected log resource into job: " + log);
 
                         return null;
@@ -493,10 +351,6 @@ public class GridResourceIsolatedTaskSelfTest extends GridCommonAbstractTest {
 
         /** {@inheritDoc} */
         @Override public Object reduce(List<ComputeJobResult> results) throws IgniteCheckedException {
-            assert rsrc1 != null;
-            assert rsrc2 != null;
-            assert rsrc3 != null;
-            assert rsrc4 != null;
             assert log != null;
 
             // Nothing to reduce.
@@ -507,94 +361,25 @@ public class GridResourceIsolatedTaskSelfTest extends GridCommonAbstractTest {
     /** */
     @ComputeTaskName("name")
     public static class SharedResourceTask3 extends ComputeTaskSplitAdapter<Object, Object> {
-        /** User resource. */
-        @IgniteUserResource(resourceClass = UserResource1.class)
-        private transient GridAbstractUserResource rsrc1;
-
-        /** User resource. */
-        @IgniteUserResource
-        private transient UserResource2 rsrc2;
-
-        /** User resource. */
-        @IgniteUserResource(resourceClass = UserResource1.class, resourceName = "rsrc3")
-        private transient GridAbstractUserResource rsrc3;
-
-        /** User resource. */
-        @IgniteUserResource(resourceName = "rsrc4")
-        private transient UserResource2 rsrc4;
-
         /** */
         @IgniteLoggerResource
         private IgniteLogger log;
 
         /** {@inheritDoc} */
         @Override protected Collection<ComputeJobAdapter> split(int gridSize, Object arg) throws IgniteCheckedException {
-            assert rsrc1 != null;
-            assert rsrc2 != null;
-            assert rsrc3 != null;
-            assert rsrc4 != null;
             assert log != null;
 
-            log.info("Injected shared resource1 into task: " + rsrc1);
-            log.info("Injected shared resource2 into task: " + rsrc2);
-            log.info("Injected shared resource3 into task: " + rsrc3);
-            log.info("Injected shared resource4 into task: " + rsrc4);
             log.info("Injected log resource into task: " + log);
 
-            task2Rsrc1 = rsrc1;
-            task2Rsrc2 = rsrc2;
-            task2Rsrc3 = rsrc3;
-            task2Rsrc4 = rsrc4;
-
             Collection<ComputeJobAdapter> jobs = new ArrayList<>(gridSize);
 
             for (int i = 0; i < gridSize; i++) {
                 jobs.add(new ComputeJobAdapter() {
-                    /** User resource. */
-                    @IgniteUserResource(resourceClass = UserResource1.class)
-                    private transient GridAbstractUserResource rsrc5;
-
-                    /** User resource */
-                    @IgniteUserResource
-                    private transient UserResource2 rsrc6;
-
-                    /** User resource. */
-                    @IgniteUserResource(resourceClass = UserResource1.class, resourceName = "rsrc3")
-                    private transient GridAbstractUserResource rsrc7;
-
-                    /** User resource */
-                    @IgniteUserResource(resourceName = "rsrc4")
-                    private transient UserResource2 rsrc8;
-
                     /** {@inheritDoc} */
                     @SuppressWarnings({"ObjectEquality"})
                     @Override public Serializable execute() {
-                        assert rsrc1 != null;
-                        assert rsrc2 != null;
-                        assert rsrc3 != null;
-                        assert rsrc4 != null;
                         assert log != null;
 
-                        assert rsrc5 != null;
-                        assert rsrc6 != null;
-                        assert rsrc7 != null;
-                        assert rsrc8 != null;
-
-                        // Make sure that neither task nor global scope got
-                        // created more than once.
-                        assert rsrc1 == rsrc5;
-                        assert rsrc2 == rsrc6;
-                        assert rsrc3 == rsrc7;
-                        assert rsrc4 == rsrc8;
-
-                        log.info("Injected shared resource1 into job: " + rsrc1);
-                        log.info("Injected shared resource2 into job: " + rsrc2);
-                        log.info("Injected shared resource3 into job: " + rsrc3);
-                        log.info("Injected shared resource4 into job: " + rsrc4);
-                        log.info("Injected shared resource5 into job: " + rsrc5);
-                        log.info("Injected shared resource6 into job: " + rsrc6);
-                        log.info("Injected shared resource7 into job: " + rsrc7);
-                        log.info("Injected shared resource8 into job: " + rsrc8);
                         log.info("Injected log resource into job: " + log);
 
                         return null;
@@ -607,10 +392,6 @@ public class GridResourceIsolatedTaskSelfTest extends GridCommonAbstractTest {
 
         /** {@inheritDoc} */
         @Override public Object reduce(List<ComputeJobResult> results) throws IgniteCheckedException {
-            assert rsrc1 != null;
-            assert rsrc2 != null;
-            assert rsrc3 != null;
-            assert rsrc4 != null;
             assert log != null;
 
             // Nothing to reduce.
@@ -621,94 +402,25 @@ public class GridResourceIsolatedTaskSelfTest extends GridCommonAbstractTest {
     /** */
     @ComputeTaskName("name")
     public static class SharedResourceTask4 extends ComputeTaskSplitAdapter<Object, Object> {
-        /** User resource. */
-        @IgniteUserResource(resourceClass = UserResource1.class)
-        private transient GridAbstractUserResource rsrc1;
-
-        /** User resource. */
-        @IgniteUserResource
-        private transient UserResource2 rsrc2;
-
-        /** User resource.  */
-        @IgniteUserResource(resourceClass = UserResource1.class, resourceName = "rsrc3")
-        private transient GridAbstractUserResource rsrc3;
-
-        /** User resource. */
-        @IgniteUserResource(resourceName = "rsrc4")
-        private transient UserResource2 rsrc4;
-
         /** */
         @IgniteLoggerResource
         private IgniteLogger log;
 
         /** {@inheritDoc} */
         @Override protected Collection<ComputeJobAdapter> split(int gridSize, Object arg) throws IgniteCheckedException {
-            assert rsrc1 != null;
-            assert rsrc2 != null;
-            assert rsrc3 != null;
-            assert rsrc4 != null;
             assert log != null;
 
-            log.info("Injected shared resource1 into task: " + rsrc1);
-            log.info("Injected shared resource2 into task: " + rsrc2);
-            log.info("Injected shared resource3 into task: " + rsrc3);
-            log.info("Injected shared resource4 into task: " + rsrc4);
             log.info("Injected log resource into task: " + log);
 
-            task2Rsrc1 = rsrc1;
-            task2Rsrc2 = rsrc2;
-            task2Rsrc3 = rsrc3;
-            task2Rsrc4 = rsrc4;
-
             Collection<ComputeJobAdapter> jobs = new ArrayList<>(gridSize);
 
             for (int i = 0; i < gridSize; i++) {
                 jobs.add(new ComputeJobAdapter() {
-                    /** User resource. */
-                    @IgniteUserResource(resourceClass = UserResource1.class)
-                    private transient GridAbstractUserResource rsrc5;
-
-                    /** User resource */
-                    @IgniteUserResource
-                    private transient UserResource2 rsrc6;
-
-                    /** User resource. */
-                    @IgniteUserResource(resourceClass = UserResource1.class, resourceName = "rsrc3")
-                    private transient GridAbstractUserResource rsrc7;
-
-                    /** User resource */
-                    @IgniteUserResource(resourceName = "rsrc4")
-                    private transient UserResource2 rsrc8;
-
                     /** {@inheritDoc} */
                     @SuppressWarnings({"ObjectEquality"})
                     @Override public Serializable execute() {
-                        assert rsrc1 != null;
-                        assert rsrc2 != null;
-                        assert rsrc3 != null;
-                        assert rsrc4 != null;
                         assert log != null;
 
-                        assert rsrc5 != null;
-                        assert rsrc6 != null;
-                        assert rsrc7 != null;
-                        assert rsrc8 != null;
-
-                        // Make sure that neither task nor global scope got
-                        // created more than once.
-                        assert rsrc1 == rsrc5;
-                        assert rsrc2 == rsrc6;
-                        assert rsrc3 == rsrc7;
-                        assert rsrc4 == rsrc8;
-
-                        log.info("Injected shared resource1 into job: " + rsrc1);
-                        log.info("Injected shared resource2 into job: " + rsrc2);
-                        log.info("Injected shared resource3 into job: " + rsrc3);
-                        log.info("Injected shared resource4 into job: " + rsrc4);
-                        log.info("Injected shared resource5 into job: " + rsrc5);
-                        log.info("Injected shared resource6 into job: " + rsrc6);
-                        log.info("Injected shared resource7 into job: " + rsrc7);
-                        log.info("Injected shared resource8 into job: " + rsrc8);
                         log.info("Injected log resource into job: " + log);
 
                         return null;
@@ -721,10 +433,6 @@ public class GridResourceIsolatedTaskSelfTest extends GridCommonAbstractTest {
 
         /** {@inheritDoc} */
         @Override public Object reduce(List<ComputeJobResult> results) throws IgniteCheckedException {
-            assert rsrc1 != null;
-            assert rsrc2 != null;
-            assert rsrc3 != null;
-            assert rsrc4 != null;
             assert log != null;
 
             // Nothing to reduce.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ad57f8ed/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceMethodInjectionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceMethodInjectionSelfTest.java b/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceMethodInjectionSelfTest.java
index f5d7302..a2e0536 100644
--- a/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceMethodInjectionSelfTest.java
+++ b/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceMethodInjectionSelfTest.java
@@ -121,32 +121,6 @@ public class GridResourceMethodInjectionSelfTest extends GridCommonAbstractTest
         public void setSpringBean(UserSpringBean springBean) {
             this.springBean = springBean;
         }
-
-        /**
-         * Method must be called.
-         * Parent GridAbstractUserResource#deploy() with the same annotation
-         * must be called too.
-         */
-        @SuppressWarnings({"UnusedDeclaration", "unused"})
-        @IgniteUserResourceOnDeployed
-        private void resourceDeploy() {
-            addUsage(deployClss);
-
-            assert springBean != null;
-        }
-
-        /**
-         * Method must be called.
-         * Parent GridAbstractUserResource#undeploy() with the same annotation
-         * must be called too.
-         */
-        @SuppressWarnings({"UnusedDeclaration", "unused"})
-        @IgniteUserResourceOnUndeployed
-        private void resourceUndeploy() {
-            addUsage(undeployClss);
-
-            assert springBean != null;
-        }
     }
 
     /** */
@@ -158,11 +132,6 @@ public class GridResourceMethodInjectionSelfTest extends GridCommonAbstractTest
      * Task that will always fail due to non-transient resource injection.
      */
     public static class NonTransientUserResourceTask extends ComputeTaskSplitAdapter<Object, Object> {
-        /** */
-        @SuppressWarnings({"UnusedDeclaration", "unused"})
-        @IgniteUserResource(resourceClass = UserResource1.class)
-        private GridAbstractUserResource rsrc;
-
         /** {@inheritDoc} */
         @Override protected Collection<? extends ComputeJob> split(int gridSize, Object arg) throws IgniteCheckedException {
             // Never reached.
@@ -225,38 +194,6 @@ public class GridResourceMethodInjectionSelfTest extends GridCommonAbstractTest
         private transient ComputeTaskContinuousMapper mapper;
 
         /**
-         * @param rsrc1 Resource 1.
-         */
-        @IgniteUserResource(resourceClass = UserResource1.class)
-        public void setResource1(GridAbstractUserResource rsrc1) {
-            this.rsrc1 = rsrc1;
-        }
-
-        /**
-         * @param rsrc2 Resource 2.
-         */
-        @IgniteUserResource
-        public void setResource2(UserResource2 rsrc2) {
-            this.rsrc2 = rsrc2;
-        }
-
-        /**
-         * @param rsrc3 Resource 3.
-         */
-        @IgniteUserResource(resourceClass = UserResource1.class, resourceName = "rsrc3")
-        public void setResource3(GridAbstractUserResource rsrc3) {
-            this.rsrc3 = rsrc3;
-        }
-
-        /**
-         * @param rsrc4 Resource 4.
-         */
-        @IgniteUserResource(resourceName = "rsrc4")
-        public void setResource4(UserResource2 rsrc4) {
-            this.rsrc4 = rsrc4;
-        }
-
-        /**
          * @param log Logger.
          */
         @IgniteLoggerResource
@@ -378,54 +315,6 @@ public class GridResourceMethodInjectionSelfTest extends GridCommonAbstractTest
                     /** */
                     private UserSpringBean springBean2;
 
-                    /**
-                     * @param rsrc5 Resource 5.
-                     */
-                    @IgniteUserResource(resourceClass = UserResource3.class)
-                    public void setResource5(GridAbstractUserResource rsrc5) {
-                        this.rsrc5 = rsrc5;
-                    }
-
-                    /**
-                     * @param rsrc6 Resource 6.
-                     */
-                    @IgniteUserResource
-                    public void setResource6(UserResource4 rsrc6) {
-                        this.rsrc6 = rsrc6;
-                    }
-
-                    /**
-                     * @param rsrc7 Resource 7.
-                     */
-                    @IgniteUserResource
-                    public void setResource7(UserResource5 rsrc7) {
-                        this.rsrc7 = rsrc7;
-                    }
-
-                    /**
-                     * @param rsrc8 Resource 8.
-                     */
-                    @IgniteUserResource(resourceClass = UserResource3.class, resourceName = "rsrc8")
-                    public void setResource8(GridAbstractUserResource rsrc8) {
-                        this.rsrc8 = rsrc8;
-                    }
-
-                    /**
-                     * @param rsrc9 Resource 9.
-                     */
-                    @IgniteUserResource(resourceName = "rsrc9")
-                    public void setResource9(UserResource4 rsrc9) {
-                        this.rsrc9 = rsrc9;
-                    }
-
-                    /**
-                     * @param rsrc10 Resource 10.
-                     */
-                    @IgniteUserResource(resourceName = "rsrc10")
-                    public void setResource10(UserResource5 rsrc10) {
-                        this.rsrc10 = rsrc10;
-                    }
-
                     /** */
                     @IgniteJobContextResource
                     private ComputeJobContext jobCtx;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ad57f8ed/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceMethodOverrideInjectionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceMethodOverrideInjectionSelfTest.java b/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceMethodOverrideInjectionSelfTest.java
index 5b8e2dc..75b4f15 100644
--- a/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceMethodOverrideInjectionSelfTest.java
+++ b/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceMethodOverrideInjectionSelfTest.java
@@ -116,42 +116,6 @@ public class GridResourceMethodOverrideInjectionSelfTest extends GridCommonAbstr
         protected transient ComputeTaskContinuousMapper mapper;
 
         /**
-         * @param rsrc1 User defined resource.
-         */
-        @IgniteUserResource(resourceClass = UserResource1.class)
-        @SuppressWarnings("unused")
-        public void setResource1(GridAbstractUserResource rsrc1) {
-            this.rsrc1 = rsrc1;
-        }
-
-        /**
-         * @param rsrc2 User defined resource.
-         */
-        @IgniteUserResource
-        @SuppressWarnings("unused")
-        protected void setResource2(UserResource2 rsrc2) {
-            this.rsrc2 = rsrc2;
-        }
-
-        /**
-         * @param rsrc3 User defined resource.
-         */
-        @IgniteUserResource(resourceClass = UserResource1.class, resourceName = "rsrc3")
-        @SuppressWarnings("unused")
-        public void setResource3(GridAbstractUserResource rsrc3) {
-            this.rsrc3 = rsrc3;
-        }
-
-        /**
-         * @param rsrc4 User defined resource.
-         */
-        @IgniteUserResource(resourceName = "rsrc4")
-        @SuppressWarnings("unused")
-        public void setResource4(UserResource2 rsrc4) {
-            this.rsrc4 = rsrc4;
-        }
-
-        /**
          * @param log GridLogger.
          */
         @SuppressWarnings({"UnusedDeclaration", "unused"})
@@ -205,38 +169,6 @@ public class GridResourceMethodOverrideInjectionSelfTest extends GridCommonAbstr
      */
     private static class MethodResourceOverrideTask extends AbstractResourceTask {
         /**
-         * @param rsrc1 User resource.
-         */
-        @IgniteUserResource(resourceClass = UserResource1.class)
-        @Override public void setResource1(GridAbstractUserResource rsrc1) {
-            this.rsrc1 = rsrc1;
-        }
-
-        /**
-         * @param rsrc2 UserResource2
-         */
-        @IgniteUserResource
-        @Override public void setResource2(UserResource2 rsrc2) {
-            this.rsrc2 = rsrc2;
-        }
-
-        /**
-         * @param rsrc3 The grid resource.
-         */
-        @IgniteUserResource(resourceClass = UserResource1.class, resourceName = "rsrc3")
-        @Override public void setResource3(GridAbstractUserResource rsrc3) {
-            this.rsrc3 = rsrc3;
-        }
-
-        /**
-         * @param rsrc4 The grid resource.
-         */
-        @IgniteUserResource(resourceName = "rsrc4")
-        @Override public void setResource4(UserResource2 rsrc4) {
-            this.rsrc4 = rsrc4;
-        }
-
-        /**
          * @param log GridLogger. The grid logger resource.
          */
         @SuppressWarnings({"MethodOverridesPrivateMethodOfSuperclass", "unused"})
@@ -313,34 +245,6 @@ public class GridResourceMethodOverrideInjectionSelfTest extends GridCommonAbstr
                     private ComputeJobContext jobCtx;
 
                     /**
-                     * @param rsrc5 User resource.
-                     */
-                    @SuppressWarnings("unused")
-                    @IgniteUserResource(resourceClass = UserResource1.class)
-                    public void setResource5(GridAbstractUserResource rsrc5) { this.rsrc5 = rsrc5; }
-
-                    /**
-                     * @param rsrc6 User resource.
-                     */
-                    @SuppressWarnings("unused")
-                    @IgniteUserResource
-                    public void setResource6(UserResource2 rsrc6) { this.rsrc6 = rsrc6; }
-
-                    /**
-                     * @param rsrc7 User resource.
-                     */
-                    @SuppressWarnings("unused")
-                    @IgniteUserResource(resourceClass = UserResource1.class, resourceName = "rsrc3")
-                    public void setResource7(GridAbstractUserResource rsrc7) { this.rsrc7 = rsrc7; }
-
-                    /**
-                     * @param rsrc8 User resource.
-                     */
-                    @SuppressWarnings("unused")
-                    @IgniteUserResource(resourceName = "rsrc4")
-                    public void setResource8(UserResource2 rsrc8) { this.rsrc8 = rsrc8; }
-
-                    /**
                      * @param jobCtx Job context.
                      */
                     @SuppressWarnings("unused")

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ad57f8ed/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceSharedUndeploySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceSharedUndeploySelfTest.java b/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceSharedUndeploySelfTest.java
index 834f311..03885d7 100644
--- a/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceSharedUndeploySelfTest.java
+++ b/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceSharedUndeploySelfTest.java
@@ -433,45 +433,16 @@ public class GridResourceSharedUndeploySelfTest extends GridCommonAbstractTest {
 
     /** */
     public static class SharedResourceTask1 extends ComputeTaskSplitAdapter<Object, Object> {
-        /** User resource.  */
-        @IgniteUserResource(resourceClass = UserResource1.class)
-        private transient GridAbstractUserResource rsrc1;
-
-        /** User resource. */
-        @IgniteUserResource
-        private transient UserResource2 rsrc2;
-
-        /** User resource.  */
-        @IgniteUserResource(resourceClass = UserResource1.class, resourceName = "rsrc3")
-        private transient GridAbstractUserResource rsrc3;
-
-        /** User resource. */
-        @IgniteUserResource(resourceName = "rsrc4")
-        private transient UserResource2 rsrc4;
-
         /** */
         @IgniteLoggerResource
         private IgniteLogger log;
 
         /** {@inheritDoc} */
         @Override protected Collection<ComputeJobAdapter> split(int gridSize, Object arg) throws IgniteCheckedException {
-            assert rsrc1 != null;
-            assert rsrc2 != null;
-            assert rsrc3 != null;
-            assert rsrc4 != null;
             assert log != null;
 
-            log.info("Injected shared resource1 into task: " + rsrc1);
-            log.info("Injected shared resource2 into task: " + rsrc2);
-            log.info("Injected shared resource3 into task: " + rsrc3);
-            log.info("Injected shared resource4 into task: " + rsrc4);
             log.info("Injected log resource into task: " + log);
 
-            task1Rsrc1 = rsrc1;
-            task1Rsrc2 = rsrc2;
-            task1Rsrc3 = rsrc3;
-            task1Rsrc4 = rsrc4;
-
             Collection<ComputeJobAdapter> jobs = new ArrayList<>(gridSize);
 
             for (int i = 0; i < gridSize; i++)
@@ -482,10 +453,6 @@ public class GridResourceSharedUndeploySelfTest extends GridCommonAbstractTest {
 
         /** {@inheritDoc} */
         @Override public Object reduce(List<ComputeJobResult> results) throws IgniteCheckedException {
-            assert rsrc1 != null;
-            assert rsrc2 != null;
-            assert rsrc3 != null;
-            assert rsrc4 != null;
             assert log != null;
 
             // Nothing to reduce.
@@ -497,51 +464,11 @@ public class GridResourceSharedUndeploySelfTest extends GridCommonAbstractTest {
          * access when loading class with different class loader.
          */
         public final class GridSharedJob1 extends ComputeJobAdapter {
-            /** User resource. */
-            @IgniteUserResource(resourceClass = UserResource1.class)
-            private transient GridAbstractUserResource rsrc5;
-
-            /** Global resource. */
-            @IgniteUserResource
-            private transient UserResource2 rsrc6;
-
-            /** User resource. */
-            @IgniteUserResource(resourceClass = UserResource1.class, resourceName = "rsrc3")
-            private transient GridAbstractUserResource rsrc7;
-
-            /** Global resource. */
-            @IgniteUserResource(resourceName = "rsrc4")
-            private transient UserResource2 rsrc8;
-
             /** {@inheritDoc} */
             @SuppressWarnings({"ObjectEquality"})
             @Override public Serializable execute() {
-                assert rsrc1 != null;
-                assert rsrc2 != null;
-                assert rsrc3 != null;
-                assert rsrc4 != null;
                 assert log != null;
 
-                assert rsrc5 != null;
-                assert rsrc6 != null;
-                assert rsrc7 != null;
-                assert rsrc8 != null;
-
-                // Make sure that neither task nor global scope got
-                // created more than once.
-                assert rsrc1 == rsrc5;
-                assert rsrc2 == rsrc6;
-                assert rsrc3 == rsrc7;
-                assert rsrc4 == rsrc8;
-
-                log.info("Injected shared resource1 into job: " + rsrc1);
-                log.info("Injected shared resource2 into job: " + rsrc2);
-                log.info("Injected shared resource3 into job: " + rsrc3);
-                log.info("Injected shared resource4 into job: " + rsrc4);
-                log.info("Injected shared resource5 into job: " + rsrc5);
-                log.info("Injected shared resource6 into job: " + rsrc6);
-                log.info("Injected shared resource7 into job: " + rsrc7);
-                log.info("Injected shared resource8 into job: " + rsrc8);
                 log.info("Injected log resource into job: " + log);
 
                 return null;
@@ -551,94 +478,25 @@ public class GridResourceSharedUndeploySelfTest extends GridCommonAbstractTest {
 
     /** */
     public static class SharedResourceTask2 extends ComputeTaskSplitAdapter<Object, Object> {
-        /** User resource.  */
-        @IgniteUserResource(resourceClass = UserResource1.class)
-        private transient GridAbstractUserResource rsrc1;
-
-        /** User resource. */
-        @IgniteUserResource
-        private transient UserResource2 rsrc2;
-
-        /** User resource.  */
-        @IgniteUserResource(resourceClass = UserResource1.class, resourceName = "rsrc3")
-        private transient GridAbstractUserResource rsrc3;
-
-        /** User resource. */
-        @IgniteUserResource(resourceName = "rsrc4")
-        private transient UserResource2 rsrc4;
-
         /** */
         @IgniteLoggerResource
         private IgniteLogger log;
 
         /** {@inheritDoc} */
         @Override protected Collection<ComputeJobAdapter> split(int gridSize, Object arg) throws IgniteCheckedException {
-            assert rsrc1 != null;
-            assert rsrc2 != null;
-            assert rsrc3 != null;
-            assert rsrc4 != null;
             assert log != null;
 
-            log.info("Injected shared resource1 into task: " + rsrc1);
-            log.info("Injected shared resource2 into task: " + rsrc2);
-            log.info("Injected shared resource3 into task: " + rsrc3);
-            log.info("Injected shared resource4 into task: " + rsrc4);
             log.info("Injected log resource into task: " + log);
 
-            task2Rsrc1 = rsrc1;
-            task2Rsrc2 = rsrc2;
-            task2Rsrc3 = rsrc3;
-            task2Rsrc4 = rsrc4;
-
             Collection<ComputeJobAdapter> jobs = new ArrayList<>(gridSize);
 
             for (int i = 0; i < gridSize; i++) {
                 jobs.add(new ComputeJobAdapter() {
-                    /** User resource. */
-                    @IgniteUserResource(resourceClass = UserResource1.class)
-                    private transient GridAbstractUserResource rsrc5;
-
-                    /** User resource */
-                    @IgniteUserResource
-                    private transient UserResource2 rsrc6;
-
-                    /** User resource. */
-                    @IgniteUserResource(resourceClass = UserResource1.class, resourceName = "rsrc3")
-                    private transient GridAbstractUserResource rsrc7;
-
-                    /** User resource */
-                    @IgniteUserResource(resourceName = "rsrc4")
-                    private transient UserResource2 rsrc8;
-
                     /** {@inheritDoc} */
                     @SuppressWarnings({"ObjectEquality"})
                     @Override public Serializable execute() {
-                        assert rsrc1 != null;
-                        assert rsrc2 != null;
-                        assert rsrc3 != null;
-                        assert rsrc4 != null;
                         assert log != null;
 
-                        assert rsrc5 != null;
-                        assert rsrc6 != null;
-                        assert rsrc7 != null;
-                        assert rsrc8 != null;
-
-                        // Make sure that neither task nor global scope got
-                        // created more than once.
-                        assert rsrc1 == rsrc5;
-                        assert rsrc2 == rsrc6;
-                        assert rsrc3 == rsrc7;
-                        assert rsrc4 == rsrc8;
-
-                        log.info("Injected shared resource1 into job: " + rsrc1);
-                        log.info("Injected shared resource2 into job: " + rsrc2);
-                        log.info("Injected shared resource3 into job: " + rsrc3);
-                        log.info("Injected shared resource4 into job: " + rsrc4);
-                        log.info("Injected shared resource5 into job: " + rsrc5);
-                        log.info("Injected shared resource6 into job: " + rsrc6);
-                        log.info("Injected shared resource7 into job: " + rsrc7);
-                        log.info("Injected shared resource8 into job: " + rsrc8);
                         log.info("Injected log resource into job: " + log);
 
                         return null;
@@ -651,10 +509,6 @@ public class GridResourceSharedUndeploySelfTest extends GridCommonAbstractTest {
 
         /** {@inheritDoc} */
         @Override public Object reduce(List<ComputeJobResult> results) throws IgniteCheckedException {
-            assert rsrc1 != null;
-            assert rsrc2 != null;
-            assert rsrc3 != null;
-            assert rsrc4 != null;
             assert log != null;
 
             // Nothing to reduce.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ad57f8ed/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceUserExternalTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceUserExternalTest.java b/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceUserExternalTest.java
deleted file mode 100644
index e5845cc..0000000
--- a/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceUserExternalTest.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.kernal.processors.resource;
-
-import org.apache.ignite.*;
-import org.apache.ignite.compute.*;
-import org.apache.ignite.configuration.*;
-import org.gridgain.grid.external.resource.*;
-import org.gridgain.testframework.*;
-import org.gridgain.testframework.junits.common.*;
-import org.springframework.context.support.*;
-
-/**
- *
- */
-@GridCommonTest(group = "Resource Self")
-public class GridResourceUserExternalTest extends GridCommonAbstractTest {
-    /** */
-    public GridResourceUserExternalTest() {
-        super(/*start grid*/false);
-    }
-
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
-        IgniteConfiguration c = super.getConfiguration(gridName);
-
-        // Override P2P configuration to exclude Task and Job classes
-        c.setPeerClassLoadingLocalClassPathExclude(
-            GridUserExternalResourceTask1.class.getName(),
-            GridUserExternalResourceTask2.class.getName(),
-            GridUserExternalResourceTask1.GridUserExternalResourceJob1.class.getName(),
-            GridUserExternalResourceTask2.GridUserExternalResourceJob2.class.getName(),
-            GridAbstractUserExternalResource.class.getName(),
-            GridUserExternalResource1.class.getName(),
-            GridUserExternalResource2.class.getName()
-        );
-
-        return c;
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    @SuppressWarnings("unchecked")
-    public void testExternalResources() throws Exception {
-        Ignite ignite1 = null;
-        Ignite ignite2 = null;
-
-        try {
-            ignite1 = startGrid(1, new GridSpringResourceContextImpl(new GenericApplicationContext()));
-            ignite2 = startGrid(2, new GridSpringResourceContextImpl(new GenericApplicationContext()));
-
-            GridTestClassLoader tstClsLdr = new GridTestClassLoader(null, getClass().getClassLoader(),
-                GridUserExternalResourceTask1.class.getName(),
-                GridUserExternalResourceTask2.class.getName(),
-                GridUserExternalResourceTask1.GridUserExternalResourceJob1.class.getName(),
-                GridUserExternalResourceTask2.GridUserExternalResourceJob2.class.getName(),
-                GridAbstractUserExternalResource.class.getName(),
-                GridUserExternalResource1.class.getName(),
-                GridUserExternalResource2.class.getName());
-
-            Class<? extends ComputeTask<Object, Object>> taskCls1 =
-                (Class<? extends ComputeTask<Object, Object>>)tstClsLdr.loadClass(
-                GridUserExternalResourceTask1.class.getName());
-
-            Class<? extends ComputeTask<Object, Object>> taskCls2 =
-                (Class<? extends ComputeTask<Object, Object>>)tstClsLdr.loadClass(
-                GridUserExternalResourceTask2.class.getName());
-
-            // Execute the same task twice.
-            ignite1.compute().execute(taskCls1, null);
-            ignite1.compute().execute(taskCls2, null);
-        }
-        finally {
-            GridTestUtils.close(ignite1, log());
-            GridTestUtils.close(ignite2, log());
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ad57f8ed/modules/spring/src/test/java/org/gridgain/grid/p2p/GridP2PAbstractUserResource.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/gridgain/grid/p2p/GridP2PAbstractUserResource.java b/modules/spring/src/test/java/org/gridgain/grid/p2p/GridP2PAbstractUserResource.java
index 8fb7442..3c442a0 100644
--- a/modules/spring/src/test/java/org/gridgain/grid/p2p/GridP2PAbstractUserResource.java
+++ b/modules/spring/src/test/java/org/gridgain/grid/p2p/GridP2PAbstractUserResource.java
@@ -109,32 +109,6 @@ abstract class GridP2PAbstractUserResource {
 
     /** */
     @SuppressWarnings("unused")
-    @IgniteUserResourceOnDeployed
-    private void deploy() {
-        addUsage(deployClss);
-
-        assert log != null;
-        assert ignite != null;
-        assert springCtx != null;
-
-        log.info("Deploying resource: " + this);
-    }
-
-    /** */
-    @SuppressWarnings("unused")
-    @IgniteUserResourceOnUndeployed
-    private void undeploy() {
-        addUsage(undeployClss);
-
-        assert log != null;
-        assert ignite != null;
-        assert springCtx != null;
-
-        log.info("Undeploying resource: " + this);
-    }
-
-    /** */
-    @SuppressWarnings("unused")
     private void neverCalled() {
         assert false;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ad57f8ed/modules/spring/src/test/java/org/gridgain/grid/p2p/GridP2PContinuousLocalDeploySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/gridgain/grid/p2p/GridP2PContinuousLocalDeploySelfTest.java b/modules/spring/src/test/java/org/gridgain/grid/p2p/GridP2PContinuousLocalDeploySelfTest.java
index bb46776..c285781 100644
--- a/modules/spring/src/test/java/org/gridgain/grid/p2p/GridP2PContinuousLocalDeploySelfTest.java
+++ b/modules/spring/src/test/java/org/gridgain/grid/p2p/GridP2PContinuousLocalDeploySelfTest.java
@@ -177,26 +177,12 @@ public class GridP2PContinuousLocalDeploySelfTest extends GridCommonAbstractTest
         @IgniteLoggerResource
         private IgniteLogger log;
 
-        /** User resource.  */
-        @IgniteUserResource(resourceClass = UserResource1.class)
-        private transient GridP2PAbstractUserResource rsrc1;
-
-        /** User resource. */
-        @IgniteUserResource
-        private transient UserResource2 rsrc2;
-
         /** Grid instance. */
         @IgniteInstanceResource
         private Ignite ignite;
 
         /** {@inheritDoc} */
         @Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, @Nullable Object arg) throws IgniteCheckedException {
-            log.info("Injected resource1: " + rsrc1);
-            log.info("Injected resource1: " + rsrc2);
-
-            assert rsrc1 != null;
-            assert rsrc2 != null;
-
             return Collections.<ComputeJob, ClusterNode>singletonMap(
                 new GridSharedJob1(), ignite.cluster().node(node2Id));
         }
@@ -212,18 +198,6 @@ public class GridP2PContinuousLocalDeploySelfTest extends GridCommonAbstractTest
      * Job class for the 1st task.
      */
     public static final class GridSharedJob1 extends ComputeJobAdapter {
-        /**
-         * User resource.
-         */
-        @IgniteUserResource(resourceClass = UserResource1.class)
-        private transient GridP2PAbstractUserResource rsrc3;
-
-        /**
-         * Global resource.
-         */
-        @IgniteUserResource
-        private transient UserResource2 rsrc4;
-
         /** */
         @IgniteLoggerResource
         private IgniteLogger log;
@@ -231,8 +205,6 @@ public class GridP2PContinuousLocalDeploySelfTest extends GridCommonAbstractTest
         /** {@inheritDoc} */
         @SuppressWarnings({"ObjectEquality"})
         @Override public Serializable execute() {
-            log.info("Injected shared resource1 into job: " + rsrc3);
-            log.info("Injected shared resource2 into job: " + rsrc4);
             log.info("Injected log resource into job: " + log);
 
             clsLdr1 = getClass().getClassLoader();
@@ -249,26 +221,12 @@ public class GridP2PContinuousLocalDeploySelfTest extends GridCommonAbstractTest
         @IgniteLoggerResource
         private IgniteLogger log;
 
-        /** User resource.  */
-        @IgniteUserResource(resourceClass = UserResource1.class)
-        private transient GridP2PAbstractUserResource rsrc1;
-
-        /** User resource. */
-        @IgniteUserResource
-        private transient UserResource2 rsrc2;
-
         /** Grid instance. */
         @IgniteInstanceResource
         private Ignite ignite;
 
         /** {@inheritDoc} */
         @Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, @Nullable Object arg) throws IgniteCheckedException {
-            log.info("Injected resource1: " + rsrc1);
-            log.info("Injected resource1: " + rsrc2);
-
-            assert rsrc1 != null;
-            assert rsrc2 != null;
-
             return Collections.<ComputeJob, ClusterNode>singletonMap(
                 new GridSharedJob2(), ignite.cluster().node(node2Id));
         }
@@ -284,14 +242,6 @@ public class GridP2PContinuousLocalDeploySelfTest extends GridCommonAbstractTest
      * Job class for the 2st task.
      */
     public static final class GridSharedJob2 extends ComputeJobAdapter {
-        /** User resource. */
-        @IgniteUserResource(resourceClass = UserResource1.class)
-        private transient GridP2PAbstractUserResource rsrc3;
-
-        /** Global resource. */
-        @IgniteUserResource
-        private transient UserResource2 rsrc4;
-
         /** */
         @IgniteLoggerResource
         private IgniteLogger log;
@@ -299,8 +249,6 @@ public class GridP2PContinuousLocalDeploySelfTest extends GridCommonAbstractTest
         /** {@inheritDoc} */
         @SuppressWarnings({"ObjectEquality"})
         @Override public Serializable execute() {
-            log.info("Injected shared resource1 into job: " + rsrc3);
-            log.info("Injected shared resource2 into job: " + rsrc4);
             log.info("Injected log resource into job: " + log);
 
             clsLdr2 = getClass().getClassLoader();


Mime
View raw message