ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [48/50] [abbrv] ignite git commit: Cleanup (3).
Date Wed, 24 Aug 2016 14:05:11 GMT
Cleanup (3).


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

Branch: refs/heads/ignite-2649
Commit: 4f4598660e88b345110a42458a575562a1788c99
Parents: 61f8b70
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Wed Aug 24 16:36:20 2016 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Wed Aug 24 16:36:20 2016 +0300

----------------------------------------------------------------------
 .../ignite/cache/store/jdbc/CacheJdbcBlobStore.java |  2 +-
 .../ignite/internal/GridEventConsumeHandler.java    |  6 +++---
 .../ignite/internal/GridJobSiblingsResponse.java    |  2 +-
 .../ignite/internal/GridMessageListenHandler.java   |  8 ++++----
 .../managers/checkpoint/GridCheckpointManager.java  |  4 ++--
 .../managers/communication/GridIoManager.java       | 10 +++++-----
 .../deployment/GridDeploymentCommunication.java     |  4 ++--
 .../eventstorage/GridEventStorageManager.java       | 16 ++++++++--------
 .../managers/swapspace/GridSwapSpaceManager.java    |  2 +-
 .../processors/affinity/GridAffinityUtils.java      |  4 ++--
 .../cache/CacheEntrySerializablePredicate.java      |  4 ++--
 .../processors/cache/CacheInvokeDirectResult.java   |  4 ++--
 .../internal/processors/cache/GridCacheMessage.java |  8 ++++----
 .../distributed/GridDistributedLockResponse.java    |  4 ++--
 .../GridDistributedTxPrepareRequest.java            |  4 ++--
 .../GridDistributedTxPrepareResponse.java           |  4 ++--
 .../dht/GridDhtAffinityAssignmentResponse.java      |  4 ++--
 .../distributed/dht/GridDhtTxFinishResponse.java    |  4 ++--
 .../dht/atomic/GridDhtAtomicUpdateResponse.java     |  4 ++--
 .../dht/atomic/GridNearAtomicUpdateRequest.java     |  4 ++--
 .../dht/atomic/GridNearAtomicUpdateResponse.java    |  4 ++--
 .../dht/preloader/GridDhtForceKeysResponse.java     |  4 ++--
 .../preloader/GridDhtPartitionDemandMessage.java    |  4 ++--
 .../dht/preloader/GridDhtPartitionsFullMessage.java |  8 ++++----
 .../preloader/GridDhtPartitionsSingleMessage.java   |  8 ++++----
 .../cache/distributed/near/GridNearGetResponse.java |  4 ++--
 .../distributed/near/GridNearSingleGetResponse.java |  4 ++--
 .../distributed/near/GridNearTxFinishResponse.java  |  4 ++--
 .../cache/query/GridCacheQueryRequest.java          | 14 +++++++-------
 .../cache/query/GridCacheQueryResponse.java         |  4 ++--
 .../processors/cache/query/GridCacheSqlQuery.java   |  2 +-
 .../continuous/CacheContinuousQueryHandler.java     |  4 ++--
 .../cache/query/jdbc/GridCacheQueryJdbcTask.java    |  2 +-
 .../cache/transactions/IgniteTxEntry.java           |  8 ++++----
 .../cache/version/GridCacheRawVersionedEntry.java   |  8 ++++----
 .../cacheobject/IgniteCacheObjectProcessorImpl.java |  4 ++--
 .../processors/closure/GridClosureProcessor.java    |  2 +-
 .../continuous/GridContinuousProcessor.java         |  8 ++++----
 .../processors/continuous/StartRequestData.java     |  2 +-
 .../datastreamer/DataStreamProcessor.java           |  8 ++++----
 .../processors/datastreamer/DataStreamerImpl.java   |  4 ++--
 .../internal/processors/igfs/IgfsAckMessage.java    |  2 +-
 .../internal/processors/igfs/IgfsDeleteMessage.java |  2 +-
 .../internal/processors/job/GridJobProcessor.java   | 16 ++++++++--------
 .../internal/processors/job/GridJobWorker.java      |  4 ++--
 .../processors/offheap/GridOffHeapProcessor.java    |  2 +-
 .../rest/handlers/task/GridTaskCommandHandler.java  |  8 ++++----
 .../rest/protocols/tcp/GridTcpRestParser.java       |  2 +-
 .../processors/service/GridServiceProcessor.java    |  6 +++---
 .../internal/processors/task/GridTaskProcessor.java |  8 ++++----
 .../internal/processors/task/GridTaskWorker.java    | 12 ++++++------
 .../apache/ignite/marshaller/MarshallerUtils.java   |  4 ++--
 .../apache/ignite/spi/discovery/tcp/ServerImpl.java | 10 +++++-----
 .../ignite/spi/discovery/tcp/TcpDiscoverySpi.java   |  4 ++--
 .../multicast/TcpDiscoveryMulticastIpFinder.java    |  4 ++--
 .../messages/TcpDiscoveryCustomEventMessage.java    |  3 +--
 .../apache/ignite/stream/socket/SocketStreamer.java |  3 +--
 .../communication/HadoopMarshallerFilter.java       |  2 +-
 .../processors/query/h2/IgniteH2Indexing.java       |  4 ++--
 .../ignite/cache/websession/WebSessionV2.java       |  2 +-
 60 files changed, 154 insertions(+), 156 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStore.java b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStore.java
index 8d5227c..15aa111 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStore.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStore.java
@@ -576,7 +576,7 @@ public class CacheJdbcBlobStore<K, V> extends CacheStoreAdapter<K, V> {
         if (bytes == null || bytes.length == 0)
             return null;
 
-        return MarshallerUtils.unmarshal(marsh, bytes, getClass().getClassLoader(), ignite.name());
+        return MarshallerUtils.unmarshal(ignite.name(), marsh, bytes, getClass().getClassLoader());
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/GridEventConsumeHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridEventConsumeHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/GridEventConsumeHandler.java
index 5cb3f6a..243d5f2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridEventConsumeHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridEventConsumeHandler.java
@@ -387,8 +387,8 @@ class GridEventConsumeHandler implements GridContinuousHandler {
             if (dep == null)
                 throw new IgniteDeploymentCheckedException("Failed to obtain deployment for class: " + clsName);
 
-            filter = MarshallerUtils.unmarshal(ctx.config().getMarshaller(), filterBytes,
-                U.resolveClassLoader(dep.classLoader(), ctx.config()), ctx.gridName());
+            filter = MarshallerUtils.unmarshal(ctx.gridName(), ctx.config().getMarshaller(), filterBytes,
+                U.resolveClassLoader(dep.classLoader(), ctx.config()));
         }
     }
 
@@ -505,7 +505,7 @@ class GridEventConsumeHandler implements GridContinuousHandler {
             assert evt == null;
             assert bytes != null;
 
-            evt = MarshallerUtils.unmarshal(ctx.config().getMarshaller(), bytes, ldr, ctx.gridName());
+            evt = MarshallerUtils.unmarshal(ctx.gridName(), ctx.config().getMarshaller(), bytes, ldr);
         }
 
         /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/GridJobSiblingsResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridJobSiblingsResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/GridJobSiblingsResponse.java
index 714fb13..55f332b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridJobSiblingsResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridJobSiblingsResponse.java
@@ -76,7 +76,7 @@ public class GridJobSiblingsResponse implements Message {
         assert marsh != null;
 
         if (siblingsBytes != null)
-            siblings = MarshallerUtils.unmarshal(marsh, siblingsBytes, null, ctx.gridName());
+            siblings = MarshallerUtils.unmarshal(ctx.gridName(), marsh, siblingsBytes, null);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/GridMessageListenHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridMessageListenHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/GridMessageListenHandler.java
index 1d2dda9..3d1f399 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridMessageListenHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridMessageListenHandler.java
@@ -194,12 +194,12 @@ public class GridMessageListenHandler implements GridContinuousHandler {
         ClassLoader ldr = dep.classLoader();
 
         if (topicBytes != null) {
-            topic = MarshallerUtils.unmarshal(ctx.config().getMarshaller(), topicBytes,
-                U.resolveClassLoader(ldr, ctx.config()), ctx.gridName());
+            topic = MarshallerUtils.unmarshal(ctx.gridName(), ctx.config().getMarshaller(), topicBytes,
+                U.resolveClassLoader(ldr, ctx.config()));
         }
 
-        pred = MarshallerUtils.unmarshal(ctx.config().getMarshaller(), predBytes,
-            U.resolveClassLoader(ldr, ctx.config()), ctx.gridName());
+        pred = MarshallerUtils.unmarshal(ctx.gridName(), ctx.config().getMarshaller(), predBytes,
+            U.resolveClassLoader(ldr, ctx.config()));
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointManager.java
index 483922f..f2fd64f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointManager.java
@@ -339,8 +339,8 @@ public class GridCheckpointManager extends GridManagerAdapter<CheckpointSpi> {
 
             // Always deserialize with task/session class loader.
             if (data != null) {
-                state = MarshallerUtils.unmarshal(marsh, data,
-                    U.resolveClassLoader(ses.getClassLoader(), ctx.config()), ctx.gridName());
+                state = MarshallerUtils.unmarshal(ctx.gridName(), marsh, data,
+                    U.resolveClassLoader(ses.getClassLoader(), ctx.config()));
             }
 
             record(EVT_CHECKPOINT_LOADED, key);

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
index 855fd8a..faedcea 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
@@ -595,7 +595,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
                 int topicOrd = msg.topicOrdinal();
 
                 msg.topic(topicOrd >= 0 ? GridTopic.fromOrdinal(topicOrd) :
-                    MarshallerUtils.unmarshal(marsh, msg.topicBytes(), U.resolveClassLoader(ctx.config()), ctx.gridName()));
+                    MarshallerUtils.unmarshal(ctx.gridName(), marsh, msg.topicBytes(), U.resolveClassLoader(ctx.config())));
             }
 
             if (!started) {
@@ -2038,8 +2038,8 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
 
                     // Unmarshall message topic if needed.
                     if (msgTopic == null && msgTopicBytes != null) {
-                        msgTopic = MarshallerUtils.unmarshal(marsh, msgTopicBytes,
-                            U.resolveClassLoader(dep != null ? dep.classLoader() : null, ctx.config()), ctx.gridName());
+                        msgTopic = MarshallerUtils.unmarshal(ctx.gridName(), marsh, msgTopicBytes,
+                            U.resolveClassLoader(dep != null ? dep.classLoader() : null, ctx.config()));
 
                         ioMsg.topic(msgTopic); // Save topic to avoid future unmarshallings.
                     }
@@ -2048,8 +2048,8 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
                         return;
 
                     if (msgBody == null) {
-                        msgBody = MarshallerUtils.unmarshal(marsh, ioMsg.bodyBytes(),
-                            U.resolveClassLoader(dep != null ? dep.classLoader() : null, ctx.config()), ctx.gridName());
+                        msgBody = MarshallerUtils.unmarshal(ctx.gridName(), marsh, ioMsg.bodyBytes(),
+                            U.resolveClassLoader(dep != null ? dep.classLoader() : null, ctx.config()));
 
                         ioMsg.body(msgBody); // Save body to avoid future unmarshallings.
                     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentCommunication.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentCommunication.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentCommunication.java
index 86ab22e..880cfca 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentCommunication.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentCommunication.java
@@ -184,8 +184,8 @@ class GridDeploymentCommunication {
 
         if (req.responseTopic() == null) {
             try {
-                req.responseTopic(MarshallerUtils.unmarshal(marsh, req.responseTopicBytes(),
-                    U.resolveClassLoader(ctx.config()), ctx.gridName()));
+                req.responseTopic(MarshallerUtils.unmarshal(ctx.gridName(), marsh, req.responseTopicBytes(),
+                    U.resolveClassLoader(ctx.config())));
             }
             catch (IgniteCheckedException e) {
                 U.error(log, "Failed to process deployment request (will ignore): " + req, e);

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java
index 7dabd81..ac76cdc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java
@@ -892,12 +892,12 @@ public class GridEventStorageManager extends GridManagerAdapter<EventStorageSpi>
 
                 try {
                     if (res.eventsBytes() != null)
-                        res.events(MarshallerUtils.<Collection<Event>>unmarshal(marsh, res.eventsBytes(),
-                            U.resolveClassLoader(ctx.config()), ctx.gridName()));
+                        res.events(MarshallerUtils.<Collection<Event>>unmarshal(ctx.gridName(), marsh, res.eventsBytes(),
+                            U.resolveClassLoader(ctx.config())));
 
                     if (res.exceptionBytes() != null)
-                        res.exception(MarshallerUtils.<Throwable>unmarshal(marsh, res.exceptionBytes(),
-                            U.resolveClassLoader(ctx.config()), ctx.gridName()));
+                        res.exception(MarshallerUtils.<Throwable>unmarshal(ctx.gridName(), marsh, res.exceptionBytes(),
+                            U.resolveClassLoader(ctx.config())));
                 }
                 catch (IgniteCheckedException e) {
                     U.error(log, "Failed to unmarshal events query response: " + msg, e);
@@ -1090,8 +1090,8 @@ public class GridEventStorageManager extends GridManagerAdapter<EventStorageSpi>
 
                 try {
                     if (req.responseTopicBytes() != null) {
-                        req.responseTopic(MarshallerUtils.unmarshal(marsh, req.responseTopicBytes(),
-                            U.resolveClassLoader(ctx.config()), ctx.gridName()));
+                        req.responseTopic(MarshallerUtils.unmarshal(ctx.gridName(), marsh, req.responseTopicBytes(),
+                            U.resolveClassLoader(ctx.config())));
                     }
 
                     GridDeployment dep = ctx.deploy().getGlobalDeployment(
@@ -1108,8 +1108,8 @@ public class GridEventStorageManager extends GridManagerAdapter<EventStorageSpi>
                         throw new IgniteDeploymentCheckedException("Failed to obtain deployment for event filter " +
                             "(is peer class loading turned on?): " + req);
 
-                    filter = MarshallerUtils.unmarshal(marsh, req.filter(),
-                        U.resolveClassLoader(dep.classLoader(), ctx.config()), ctx.gridName());
+                    filter = MarshallerUtils.unmarshal(ctx.gridName(), marsh, req.filter(),
+                        U.resolveClassLoader(dep.classLoader(), ctx.config()));
 
                     // Resource injection.
                     ctx.resource().inject(dep, dep.deployedClass(req.filterClassName()), filter);

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/managers/swapspace/GridSwapSpaceManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/swapspace/GridSwapSpaceManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/swapspace/GridSwapSpaceManager.java
index 1d205ca..767e459 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/swapspace/GridSwapSpaceManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/swapspace/GridSwapSpaceManager.java
@@ -401,7 +401,7 @@ public class GridSwapSpaceManager extends GridManagerAdapter<SwapSpaceSpi> {
         if (swapBytes == null)
             return null;
 
-        return MarshallerUtils.unmarshal(marsh, swapBytes, ldr != null ? ldr : U.gridClassLoader(), ctx.gridName());
+        return MarshallerUtils.unmarshal(ctx.gridName(), marsh, swapBytes, ldr != null ? ldr : U.gridClassLoader());
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityUtils.java
index 599a6bc..6f42e4d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityUtils.java
@@ -111,8 +111,8 @@ class GridAffinityUtils {
             throw new IgniteDeploymentCheckedException("Failed to obtain affinity object (is peer class loading turned on?): " +
                 msg);
 
-        Object src = MarshallerUtils.unmarshal(ctx.config().getMarshaller(), msg.source(),
-            U.resolveClassLoader(dep.classLoader(), ctx.config()), ctx.gridName());
+        Object src = MarshallerUtils.unmarshal(ctx.gridName(), ctx.config().getMarshaller(), msg.source(),
+            U.resolveClassLoader(dep.classLoader(), ctx.config()));
 
         // Resource injection.
         ctx.resource().inject(dep, dep.deployedClass(msg.sourceClassName()), src);

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntrySerializablePredicate.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntrySerializablePredicate.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntrySerializablePredicate.java
index 8d0d99b..f3cf1e5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntrySerializablePredicate.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntrySerializablePredicate.java
@@ -82,8 +82,8 @@ public class CacheEntrySerializablePredicate implements CacheEntryPredicate {
         assert p != null || bytes != null;
 
         if (p == null) {
-            p = MarshallerUtils.unmarshal(ctx.marshaller(), bytes,
-                U.resolveClassLoader(ldr, ctx.gridConfig()), ctx.gridName());
+            p = MarshallerUtils.unmarshal(ctx.gridName(), ctx.marshaller(), bytes,
+                U.resolveClassLoader(ldr, ctx.gridConfig()));
 
             p.finishUnmarshal(ctx, ldr);
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeDirectResult.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeDirectResult.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeDirectResult.java
index 096c2a8..fb4b830 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeDirectResult.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeDirectResult.java
@@ -123,8 +123,8 @@ public class CacheInvokeDirectResult implements Message {
         key.finishUnmarshal(ctx.cacheObjectContext(), ldr);
 
         if (errBytes != null) {
-            err = MarshallerUtils.unmarshal(ctx.marshaller(), errBytes,
-                U.resolveClassLoader(ldr, ctx.gridConfig()), ctx.gridName());
+            err = MarshallerUtils.unmarshal(ctx.gridName(), ctx.marshaller(), errBytes,
+                U.resolveClassLoader(ldr, ctx.gridConfig()));
         }
 
         if (res != null)

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java
index a0f4b06..53a0c16 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java
@@ -459,8 +459,8 @@ public abstract class GridCacheMessage implements Message {
         Marshaller marsh = ctx.marshaller();
 
         for (int i = 0; i < byteCol.length; i++) {
-            args[i] = byteCol[i] == null ? null : MarshallerUtils.unmarshal(marsh, byteCol[i],
-                U.resolveClassLoader(ldr, ctx.gridConfig()), ctx.gridName());
+            args[i] = byteCol[i] == null ? null : MarshallerUtils.unmarshal(ctx.gridName(), marsh, byteCol[i],
+                U.resolveClassLoader(ldr, ctx.gridConfig()));
         }
 
         return args;
@@ -612,8 +612,8 @@ public abstract class GridCacheMessage implements Message {
         Marshaller marsh = ctx.marshaller();
 
         for (byte[] bytes : byteCol) {
-            col.add(bytes == null ? null : MarshallerUtils.<T>unmarshal(marsh, bytes,
-                U.resolveClassLoader(ldr, ctx.gridConfig()), ctx.gridName()));
+            col.add(bytes == null ? null : MarshallerUtils.<T>unmarshal(ctx.gridName(), marsh, bytes,
+                U.resolveClassLoader(ldr, ctx.gridConfig())));
         }
 
         return col;

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
index 260672a..d0d9aa3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
@@ -214,8 +214,8 @@ public class GridDistributedLockResponse extends GridDistributedBaseMessage {
         finishUnmarshalCacheObjects(vals, ctx.cacheContext(cacheId), ldr);
 
         if (errBytes != null) {
-            err = MarshallerUtils.unmarshal(ctx.marshaller(), errBytes,
-                U.resolveClassLoader(ldr, ctx.gridConfig()), ctx.gridName());
+            err = MarshallerUtils.unmarshal(ctx.gridName(), ctx.marshaller(), errBytes,
+                U.resolveClassLoader(ldr, ctx.gridConfig()));
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
index 8b71d23..2506d9a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
@@ -374,8 +374,8 @@ public class GridDistributedTxPrepareRequest extends GridDistributedBaseMessage
             txNodes = F.viewReadOnly(txNodesMsg, MSG_TO_COL);
 
         if (txNodesBytes != null && txNodes == null)
-            txNodes = MarshallerUtils.unmarshal(ctx.marshaller(), txNodesBytes,
-                U.resolveClassLoader(ldr, ctx.gridConfig()), ctx.gridName());
+            txNodes = MarshallerUtils.unmarshal(ctx.gridName(), ctx.marshaller(), txNodesBytes,
+                U.resolveClassLoader(ldr, ctx.gridConfig()));
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareResponse.java
index 84a5bc9..8f5920d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareResponse.java
@@ -110,8 +110,8 @@ public class GridDistributedTxPrepareResponse extends GridDistributedBaseMessage
         super.finishUnmarshal(ctx, ldr);
 
         if (errBytes != null) {
-            err = MarshallerUtils.unmarshal(ctx.marshaller(), errBytes,
-                U.resolveClassLoader(ldr, ctx.gridConfig()), ctx.gridName());
+            err = MarshallerUtils.unmarshal(ctx.gridName(), ctx.marshaller(), errBytes,
+                U.resolveClassLoader(ldr, ctx.gridConfig()));
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAffinityAssignmentResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAffinityAssignmentResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAffinityAssignmentResponse.java
index fb8ca7a..11d0f9c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAffinityAssignmentResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAffinityAssignmentResponse.java
@@ -117,8 +117,8 @@ public class GridDhtAffinityAssignmentResponse extends GridCacheMessage {
         super.finishUnmarshal(ctx, ldr);
 
         if (affAssignmentBytes != null) {
-            affAssignment = MarshallerUtils.unmarshal(ctx.marshaller(), affAssignmentBytes,
-                U.resolveClassLoader(ldr, ctx.gridConfig()), ctx.gridName());
+            affAssignment = MarshallerUtils.unmarshal(ctx.gridName(), ctx.marshaller(), affAssignmentBytes,
+                U.resolveClassLoader(ldr, ctx.gridConfig()));
 
             // TODO IGNITE-2110: setting 'local' for nodes not needed when IGNITE-2110 is implemented.
             int assignments = affAssignment.size();

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishResponse.java
index 0c871e8..df93f8a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishResponse.java
@@ -122,8 +122,8 @@ public class GridDhtTxFinishResponse extends GridDistributedTxFinishResponse {
         super.finishUnmarshal(ctx, ldr);
 
         if (checkCommittedErrBytes != null) {
-            checkCommittedErr = MarshallerUtils.unmarshal(ctx.marshaller(), checkCommittedErrBytes,
-                U.resolveClassLoader(ldr, ctx.gridConfig()), ctx.gridName());
+            checkCommittedErr = MarshallerUtils.unmarshal(ctx.gridName(), ctx.marshaller(), checkCommittedErrBytes,
+                U.resolveClassLoader(ldr, ctx.gridConfig()));
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateResponse.java
index 097b316..7a5852d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateResponse.java
@@ -182,8 +182,8 @@ public class GridDhtAtomicUpdateResponse extends GridCacheMessage implements Gri
 
         finishUnmarshalCacheObjects(nearEvicted, cctx, ldr);
 
-        err = MarshallerUtils.unmarshal(ctx.marshaller(), errBytes,
-            U.resolveClassLoader(ldr, ctx.gridConfig()), ctx.gridName());
+        err = MarshallerUtils.unmarshal(ctx.gridName(), ctx.marshaller(), errBytes,
+            U.resolveClassLoader(ldr, ctx.gridConfig()));
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java
index 8edf383..446e950 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java
@@ -637,8 +637,8 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements Gri
         invokeArgs = unmarshalInvokeArguments(invokeArgsBytes, ctx, ldr);
 
         if (expiryPlcBytes != null) {
-            expiryPlc = MarshallerUtils.unmarshal(ctx.marshaller(), expiryPlcBytes,
-                U.resolveClassLoader(ldr, ctx.gridConfig()), ctx.gridName());
+            expiryPlc = MarshallerUtils.unmarshal(ctx.gridName(), ctx.marshaller(), expiryPlcBytes,
+                U.resolveClassLoader(ldr, ctx.gridConfig()));
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateResponse.java
index 0ec7ba3..f3bf5c0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateResponse.java
@@ -418,8 +418,8 @@ public class GridNearAtomicUpdateResponse extends GridCacheMessage implements Gr
         super.finishUnmarshal(ctx, ldr);
 
         if (errBytes != null) {
-            err = MarshallerUtils.unmarshal(ctx.marshaller(), errBytes,
-                U.resolveClassLoader(ldr, ctx.gridConfig()), ctx.gridName());
+            err = MarshallerUtils.unmarshal(ctx.gridName(), ctx.marshaller(), errBytes,
+                U.resolveClassLoader(ldr, ctx.gridConfig()));
         }
 
         GridCacheContext cctx = ctx.cacheContext(cacheId);

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysResponse.java
index 2f9b4de..a516831 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysResponse.java
@@ -191,8 +191,8 @@ public class GridDhtForceKeysResponse extends GridCacheMessage implements GridCa
         }
 
         if (errBytes != null) {
-            err = MarshallerUtils.unmarshal(ctx.marshaller(), errBytes,
-                U.resolveClassLoader(ldr, ctx.gridConfig()), ctx.gridName());
+            err = MarshallerUtils.unmarshal(ctx.gridName(), ctx.marshaller(), errBytes,
+                U.resolveClassLoader(ldr, ctx.gridConfig()));
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandMessage.java
index 3aadf93..f435dc3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandMessage.java
@@ -193,8 +193,8 @@ public class GridDhtPartitionDemandMessage extends GridCacheMessage {
         super.finishUnmarshal(ctx, ldr);
 
         if (topicBytes != null) {
-            topic = MarshallerUtils.unmarshal(ctx.marshaller(), topicBytes,
-                U.resolveClassLoader(ldr, ctx.gridConfig()), ctx.gridName());
+            topic = MarshallerUtils.unmarshal(ctx.gridName(), ctx.marshaller(), topicBytes,
+                U.resolveClassLoader(ldr, ctx.gridConfig()));
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsFullMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsFullMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsFullMessage.java
index ad8de3d..0498c20 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsFullMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsFullMessage.java
@@ -160,16 +160,16 @@ public class GridDhtPartitionsFullMessage extends GridDhtPartitionsAbstractMessa
         super.finishUnmarshal(ctx, ldr);
 
         if (partsBytes != null && parts == null) {
-            parts = MarshallerUtils.unmarshal(ctx.marshaller(), partsBytes,
-                U.resolveClassLoader(ldr, ctx.gridConfig()), ctx.gridName());
+            parts = MarshallerUtils.unmarshal(ctx.gridName(), ctx.marshaller(), partsBytes,
+                U.resolveClassLoader(ldr, ctx.gridConfig()));
         }
 
         if (parts == null)
             parts = new HashMap<>();
 
         if (partCntrsBytes != null && partCntrs == null) {
-            partCntrs = MarshallerUtils.unmarshal(ctx.marshaller(), partCntrsBytes,
-                U.resolveClassLoader(ldr, ctx.gridConfig()), ctx.gridName());
+            partCntrs = MarshallerUtils.unmarshal(ctx.gridName(), ctx.marshaller(), partCntrsBytes,
+                U.resolveClassLoader(ldr, ctx.gridConfig()));
         }
 
         if (partCntrs == null)

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsSingleMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsSingleMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsSingleMessage.java
index 2daeb21..38307e1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsSingleMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsSingleMessage.java
@@ -150,13 +150,13 @@ public class GridDhtPartitionsSingleMessage extends GridDhtPartitionsAbstractMes
         super.finishUnmarshal(ctx, ldr);
 
         if (partsBytes != null && parts == null) {
-            parts = MarshallerUtils.unmarshal(ctx.marshaller(), partsBytes,
-                U.resolveClassLoader(ldr, ctx.gridConfig()), ctx.gridName());
+            parts = MarshallerUtils.unmarshal(ctx.gridName(), ctx.marshaller(), partsBytes,
+                U.resolveClassLoader(ldr, ctx.gridConfig()));
         }
 
         if (partCntrsBytes != null) {
-            partCntrs = MarshallerUtils.unmarshal(ctx.marshaller(), partCntrsBytes,
-                U.resolveClassLoader(ldr, ctx.gridConfig()), ctx.gridName());
+            partCntrs = MarshallerUtils.unmarshal(ctx.gridName(), ctx.marshaller(), partCntrsBytes,
+                U.resolveClassLoader(ldr, ctx.gridConfig()));
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetResponse.java
index 7060463..03ddf43 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetResponse.java
@@ -207,8 +207,8 @@ public class GridNearGetResponse extends GridCacheMessage implements GridCacheDe
         }
 
         if (errBytes != null) {
-            err = MarshallerUtils.unmarshal(ctx.marshaller(), errBytes,
-                U.resolveClassLoader(ldr, ctx.gridConfig()), ctx.gridName());
+            err = MarshallerUtils.unmarshal(ctx.gridName(), ctx.marshaller(), errBytes,
+                U.resolveClassLoader(ldr, ctx.gridConfig()));
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearSingleGetResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearSingleGetResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearSingleGetResponse.java
index fc1f442..19b2163 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearSingleGetResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearSingleGetResponse.java
@@ -190,8 +190,8 @@ public class GridNearSingleGetResponse extends GridCacheMessage implements GridC
         }
 
         if (errBytes != null && err == null) {
-            err = MarshallerUtils.unmarshal(ctx.marshaller(), errBytes,
-                U.resolveClassLoader(ldr, ctx.gridConfig()), ctx.gridName());
+            err = MarshallerUtils.unmarshal(ctx.gridName(), ctx.marshaller(), errBytes,
+                U.resolveClassLoader(ldr, ctx.gridConfig()));
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishResponse.java
index b06aca5..e01eb9d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishResponse.java
@@ -111,8 +111,8 @@ public class GridNearTxFinishResponse extends GridDistributedTxFinishResponse {
         super.finishUnmarshal(ctx, ldr);
 
         if (errBytes != null) {
-            err = MarshallerUtils.unmarshal(ctx.marshaller(), errBytes,
-                U.resolveClassLoader(ldr, ctx.gridConfig()), ctx.gridName());
+            err = MarshallerUtils.unmarshal(ctx.gridName(), ctx.marshaller(), errBytes,
+                U.resolveClassLoader(ldr, ctx.gridConfig()));
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java
index d4de268..08cbb29 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java
@@ -320,21 +320,21 @@ public class GridCacheQueryRequest extends GridCacheMessage implements GridCache
         Marshaller marsh = ctx.marshaller();
 
         if (keyValFilterBytes != null) {
-            keyValFilter = MarshallerUtils.unmarshal(marsh, keyValFilterBytes,
-                U.resolveClassLoader(ldr, ctx.gridConfig()), ctx.gridName());
+            keyValFilter = MarshallerUtils.unmarshal(ctx.gridName(), marsh, keyValFilterBytes,
+                U.resolveClassLoader(ldr, ctx.gridConfig()));
         }
 
         if (rdcBytes != null)
-            rdc = MarshallerUtils.unmarshal(marsh, rdcBytes, ldr, ctx.gridName());
+            rdc = MarshallerUtils.unmarshal(ctx.gridName(), marsh, rdcBytes, ldr);
 
         if (transBytes != null) {
-            trans = MarshallerUtils.unmarshal(marsh, transBytes,
-                U.resolveClassLoader(ldr, ctx.gridConfig()), ctx.gridName());
+            trans = MarshallerUtils.unmarshal(ctx.gridName(), marsh, transBytes,
+                U.resolveClassLoader(ldr, ctx.gridConfig()));
         }
 
         if (argsBytes != null) {
-            args = MarshallerUtils.unmarshal(marsh, argsBytes,
-                U.resolveClassLoader(ldr, ctx.gridConfig()), ctx.gridName());
+            args = MarshallerUtils.unmarshal(ctx.gridName(), marsh, argsBytes,
+                U.resolveClassLoader(ldr, ctx.gridConfig()));
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryResponse.java
index 28d8aef..a015ac5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryResponse.java
@@ -148,8 +148,8 @@ public class GridCacheQueryResponse extends GridCacheMessage implements GridCach
         super.finishUnmarshal(ctx, ldr);
 
         if (errBytes != null) {
-            err = MarshallerUtils.unmarshal(ctx.marshaller(), errBytes,
-                U.resolveClassLoader(ldr, ctx.gridConfig()), ctx.gridName());
+            err = MarshallerUtils.unmarshal(ctx.gridName(), ctx.marshaller(), errBytes,
+                U.resolveClassLoader(ldr, ctx.gridConfig()));
         }
 
         metadata = unmarshalCollection(metaDataBytes, ctx, ldr);

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
index aae96a5..7a77ea5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
@@ -156,7 +156,7 @@ public class GridCacheSqlQuery implements Message {
 
         assert paramsBytes != null;
 
-        params = MarshallerUtils.unmarshal(m, paramsBytes, U.resolveClassLoader(ctx.config()), ctx.gridName());
+        params = MarshallerUtils.unmarshal(ctx.gridName(), m, paramsBytes, U.resolveClassLoader(ctx.config()));
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
index 461d31b..627a04b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
@@ -1560,8 +1560,8 @@ public class CacheContinuousQueryHandler<K, V> implements GridContinuousHandler
             if (dep == null)
                 throw new IgniteDeploymentCheckedException("Failed to obtain deployment for class: " + clsName);
 
-            return MarshallerUtils.unmarshal(ctx.config().getMarshaller(), bytes,
-                U.resolveClassLoader(dep.classLoader(), ctx.config()), ctx.gridName());
+            return MarshallerUtils.unmarshal(ctx.gridName(), ctx.config().getMarshaller(), bytes,
+                U.resolveClassLoader(dep.classLoader(), ctx.config()));
         }
 
         /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/jdbc/GridCacheQueryJdbcTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/jdbc/GridCacheQueryJdbcTask.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/jdbc/GridCacheQueryJdbcTask.java
index b98dcbd..a6c5f14 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/jdbc/GridCacheQueryJdbcTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/jdbc/GridCacheQueryJdbcTask.java
@@ -83,7 +83,7 @@ public class GridCacheQueryJdbcTask extends ComputeTaskAdapter<byte[], byte[]> {
         try {
             assert arg != null;
 
-            Map<String, Object> args = MarshallerUtils.unmarshal(MARSHALLER, arg, null, ignite.name());
+            Map<String, Object> args = MarshallerUtils.unmarshal(ignite.name(), MARSHALLER, arg, null);
 
             boolean first = true;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
index 8bbe151..e7fc5de 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
@@ -879,8 +879,8 @@ public class IgniteTxEntry implements GridPeerDeployAware, Message {
 
         // Unmarshal transform closure anyway if it exists.
         if (transformClosBytes != null && entryProcessorsCol == null)
-            entryProcessorsCol = MarshallerUtils.unmarshal(ctx.marshaller(),
-                    transformClosBytes, U.resolveClassLoader(clsLdr, ctx.gridConfig()), ctx.gridName());
+            entryProcessorsCol = MarshallerUtils.unmarshal(ctx.gridName(), ctx.marshaller(),
+                    transformClosBytes, U.resolveClassLoader(clsLdr, ctx.gridConfig()));
 
         if (filters == null)
             filters = CU.empty0();
@@ -896,8 +896,8 @@ public class IgniteTxEntry implements GridPeerDeployAware, Message {
         val.unmarshal(this.ctx, clsLdr);
 
         if (expiryPlcBytes != null) {
-            expiryPlc = MarshallerUtils.unmarshal(ctx.marshaller(), expiryPlcBytes,
-                U.resolveClassLoader(clsLdr, ctx.gridConfig()), ctx.gridName());
+            expiryPlc = MarshallerUtils.unmarshal(ctx.gridName(), ctx.marshaller(), expiryPlcBytes,
+                U.resolveClassLoader(clsLdr, ctx.gridConfig()));
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheRawVersionedEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheRawVersionedEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheRawVersionedEntry.java
index 0b87652..98c651b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheRawVersionedEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheRawVersionedEntry.java
@@ -192,8 +192,8 @@ public class GridCacheRawVersionedEntry<K, V> extends DataStreamerEntry implemen
         unmarshalKey(ctx, marsh);
 
         if (val == null && valBytes != null) {
-            val = MarshallerUtils.unmarshal(marsh, valBytes,
-                U.resolveClassLoader(ctx.kernalContext().config()), ctx.kernalContext().gridName());
+            val = MarshallerUtils.unmarshal(ctx.kernalContext().gridName(), marsh, valBytes,
+                U.resolveClassLoader(ctx.kernalContext().config()));
 
             val.finishUnmarshal(ctx, null);
         }
@@ -224,8 +224,8 @@ public class GridCacheRawVersionedEntry<K, V> extends DataStreamerEntry implemen
         if (key == null) {
             assert keyBytes != null;
 
-            key = MarshallerUtils.unmarshal(marsh, keyBytes,
-                U.resolveClassLoader(ctx.kernalContext().config()), ctx.kernalContext().gridName());
+            key = MarshallerUtils.unmarshal(ctx.kernalContext().gridName(), marsh, keyBytes,
+                U.resolveClassLoader(ctx.kernalContext().config()));
 
             key.finishUnmarshal(ctx, null);
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
index d46fdbd..a3070e8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
@@ -108,8 +108,8 @@ public class IgniteCacheObjectProcessorImpl extends GridProcessorAdapter impleme
     @Override public Object unmarshal(CacheObjectContext ctx, byte[] bytes, ClassLoader clsLdr)
         throws IgniteCheckedException
     {
-        return MarshallerUtils.unmarshal(ctx.kernalContext().cache().context().marshaller(),
-                bytes, U.resolveClassLoader(clsLdr, ctx.kernalContext().config()), ctx.kernalContext().gridName());
+        return MarshallerUtils.unmarshal(ctx.kernalContext().gridName(), ctx.kernalContext().cache().context().marshaller(),
+                bytes, U.resolveClassLoader(clsLdr, ctx.kernalContext().config()));
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosureProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosureProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosureProcessor.java
index a330986..fb5c2c8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosureProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosureProcessor.java
@@ -1149,7 +1149,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
                         }
 
                         if (c.job == closure)
-                            c.job = MarshallerUtils.unmarshal(marsh, closureBytes, U.resolveClassLoader(ctx.config()), ctx.gridName());
+                            c.job = MarshallerUtils.unmarshal(ctx.gridName(), marsh, closureBytes, U.resolveClassLoader(ctx.config()));
                         else
                             c.job = MarshallerUtils.marshalUnmarshal(ctx.gridName(), marsh, c.job,
                                 U.resolveClassLoader(ctx.config()));

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
index a205c2c..28df19f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
@@ -289,8 +289,8 @@ public class GridContinuousProcessor extends GridProcessorAdapter {
 
                 if (msg.data() == null && msg.dataBytes() != null) {
                     try {
-                        msg.data(MarshallerUtils.unmarshal(marsh, msg.dataBytes(),
-                            U.resolveClassLoader(ctx.config()), ctx.gridName()));
+                        msg.data(MarshallerUtils.unmarshal(ctx.gridName(), marsh, msg.dataBytes(),
+                            U.resolveClassLoader(ctx.config())));
                     }
                     catch (IgniteCheckedException e) {
                         U.error(log, "Failed to process message (ignoring): " + msg, e);
@@ -735,8 +735,8 @@ public class GridContinuousProcessor extends GridProcessorAdapter {
 
                     if (msg.data() == null && msg.dataBytes() != null) {
                         try {
-                            msg.data(MarshallerUtils.unmarshal(marsh, msg.dataBytes(),
-                                U.resolveClassLoader(ctx.config()), ctx.gridName()));
+                            msg.data(MarshallerUtils.unmarshal(ctx.gridName(), marsh, msg.dataBytes(),
+                                U.resolveClassLoader(ctx.config())));
                         }
                         catch (IgniteCheckedException e) {
                             U.error(log, "Failed to process message (ignoring): " + msg, e);

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/StartRequestData.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/StartRequestData.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/StartRequestData.java
index 4167c62..619bd86 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/StartRequestData.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/StartRequestData.java
@@ -114,7 +114,7 @@ class StartRequestData implements Externalizable {
         assert prjPred == null;
         assert prjPredBytes != null;
 
-        prjPred = MarshallerUtils.unmarshal(marsh, prjPredBytes, ldr, kernalCtx.gridName());
+        prjPred = MarshallerUtils.unmarshal(kernalCtx.gridName(), marsh, prjPredBytes, ldr);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessor.java
index 065f5ad..853d1a0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessor.java
@@ -236,8 +236,8 @@ public class DataStreamProcessor<K, V> extends GridProcessorAdapter {
             Object topic;
 
             try {
-                topic = MarshallerUtils.unmarshal(marsh, req.responseTopicBytes(),
-                    U.resolveClassLoader(null, ctx.config()), ctx.gridName());
+                topic = MarshallerUtils.unmarshal(ctx.gridName(), marsh, req.responseTopicBytes(),
+                    U.resolveClassLoader(null, ctx.config()));
             }
             catch (IgniteCheckedException e) {
                 U.error(log, "Failed to unmarshal topic from request: " + req, e);
@@ -277,8 +277,8 @@ public class DataStreamProcessor<K, V> extends GridProcessorAdapter {
             StreamReceiver<K, V> updater;
 
             try {
-                updater = MarshallerUtils.unmarshal(marsh, req.updaterBytes(),
-                    U.resolveClassLoader(clsLdr, ctx.config()), ctx.gridName());
+                updater = MarshallerUtils.unmarshal(ctx.gridName(), marsh, req.updaterBytes(),
+                    U.resolveClassLoader(clsLdr, ctx.config()));
 
                 if (updater != null)
                     ctx.resource().injectGeneric(updater);

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
index 01d17d3..9d04a5f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
@@ -1495,8 +1495,8 @@ public class DataStreamerImpl<K, V> implements IgniteDataStreamer<K, V>, Delayed
                 try {
                     GridPeerDeployAware jobPda0 = jobPda;
 
-                    err = MarshallerUtils.unmarshal(ctx.config().getMarshaller(), errBytes,
-                        U.resolveClassLoader(jobPda0 != null ? jobPda0.classLoader() : null, ctx.config()), ctx.gridName());
+                    err = MarshallerUtils.unmarshal(ctx.gridName(), ctx.config().getMarshaller(), errBytes,
+                        U.resolveClassLoader(jobPda0 != null ? jobPda0.classLoader() : null, ctx.config()));
                 }
                 catch (IgniteCheckedException e) {
                     f.onDone(null, new IgniteCheckedException("Failed to unmarshal response.", e));

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAckMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAckMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAckMessage.java
index 87d145b..20c80bb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAckMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAckMessage.java
@@ -107,7 +107,7 @@ public class IgfsAckMessage extends IgfsCommunicationMessage {
         super.finishUnmarshal(marsh, ldr, kernalCtx);
 
         if (errBytes != null)
-            err = MarshallerUtils.unmarshal(marsh, errBytes, ldr, kernalCtx.gridName());
+            err = MarshallerUtils.unmarshal(kernalCtx.gridName(), marsh, errBytes, ldr);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDeleteMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDeleteMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDeleteMessage.java
index a3e84e5..d0776bd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDeleteMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDeleteMessage.java
@@ -106,7 +106,7 @@ public class IgfsDeleteMessage extends IgfsCommunicationMessage {
         super.finishUnmarshal(marsh, ldr, kernalCtx);
 
         if (errBytes != null)
-            err = MarshallerUtils.unmarshal(marsh, errBytes, ldr, kernalCtx.gridName());
+            err = MarshallerUtils.unmarshal(kernalCtx.gridName(), marsh, errBytes, ldr);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobProcessor.java
index f3907c0..5938eb0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobProcessor.java
@@ -1019,8 +1019,8 @@ public class GridJobProcessor extends GridProcessorAdapter {
                             if (siblings0 == null) {
                                 assert req.getSiblingsBytes() != null;
 
-                                siblings0 = MarshallerUtils.unmarshal(marsh, req.getSiblingsBytes(),
-                                    U.resolveClassLoader(ctx.config()), ctx.gridName());
+                                siblings0 = MarshallerUtils.unmarshal(ctx.gridName(), marsh, req.getSiblingsBytes(),
+                                    U.resolveClassLoader(ctx.config()));
                             }
 
                             siblings = new ArrayList<>(siblings0);
@@ -1032,8 +1032,8 @@ public class GridJobProcessor extends GridProcessorAdapter {
                             sesAttrs = req.getSessionAttributes();
 
                             if (sesAttrs == null) {
-                                sesAttrs = MarshallerUtils.unmarshal(marsh, req.getSessionAttributesBytes(),
-                                    U.resolveClassLoader(dep.classLoader(), ctx.config()), ctx.gridName());
+                                sesAttrs = MarshallerUtils.unmarshal(ctx.gridName(), marsh, req.getSessionAttributesBytes(),
+                                    U.resolveClassLoader(dep.classLoader(), ctx.config()));
                             }
                         }
 
@@ -1060,8 +1060,8 @@ public class GridJobProcessor extends GridProcessorAdapter {
                         Map<? extends Serializable, ? extends Serializable> jobAttrs = req.getJobAttributes();
 
                         if (jobAttrs == null) {
-                            jobAttrs = MarshallerUtils.unmarshal(marsh, req.getJobAttributesBytes(),
-                                U.resolveClassLoader(dep.classLoader(), ctx.config()), ctx.gridName());
+                            jobAttrs = MarshallerUtils.unmarshal(ctx.gridName(), marsh, req.getJobAttributesBytes(),
+                                U.resolveClassLoader(dep.classLoader(), ctx.config()));
                         }
 
                         jobCtx = new GridJobContextImpl(ctx, req.getJobId(), jobAttrs);
@@ -1429,8 +1429,8 @@ public class GridJobProcessor extends GridProcessorAdapter {
             boolean loc = ctx.localNodeId().equals(nodeId) && !ctx.config().isMarshalLocalJobs();
 
             Map<?, ?> attrs = loc ? req.getAttributes() :
-                (Map<?, ?>)MarshallerUtils.unmarshal(marsh, req.getAttributesBytes(),
-                    U.resolveClassLoader(ses.getClassLoader(), ctx.config()), ctx.gridName());
+                (Map<?, ?>)MarshallerUtils.unmarshal(ctx.gridName(), marsh, req.getAttributesBytes(),
+                    U.resolveClassLoader(ses.getClassLoader(), ctx.config()));
 
             if (ctx.event().isRecordable(EVT_TASK_SESSION_ATTR_SET)) {
                 Event evt = new TaskEvent(

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobWorker.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobWorker.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobWorker.java
index 7af32ce..39457e7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobWorker.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobWorker.java
@@ -407,8 +407,8 @@ public class GridJobWorker extends GridWorker implements GridTimeoutObject {
 
         try {
             if (job == null) {
-                job = MarshallerUtils.unmarshal(marsh, jobBytes,
-                    U.resolveClassLoader(dep.classLoader(), ctx.config()), ctx.gridName());
+                job = MarshallerUtils.unmarshal(ctx.gridName(), marsh, jobBytes,
+                    U.resolveClassLoader(dep.classLoader(), ctx.config()));
 
                 // No need to hold reference any more.
                 jobBytes = null;

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/offheap/GridOffHeapProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/offheap/GridOffHeapProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/offheap/GridOffHeapProcessor.java
index 2e9e957..1de7049 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/offheap/GridOffHeapProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/offheap/GridOffHeapProcessor.java
@@ -213,7 +213,7 @@ public class GridOffHeapProcessor extends GridProcessorAdapter {
         if (valBytes == null)
             return null;
 
-        return MarshallerUtils.unmarshal(marsh, valBytes, U.resolveClassLoader(ldr, ctx.config()), ctx.gridName());
+        return MarshallerUtils.unmarshal(ctx.gridName(), marsh, valBytes, U.resolveClassLoader(ldr, ctx.config()));
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskCommandHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskCommandHandler.java
index 1badaf9..c052570 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskCommandHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskCommandHandler.java
@@ -142,8 +142,8 @@ public class GridTaskCommandHandler extends GridRestCommandHandlerAdapter {
                     else
                         res.found(false);
 
-                    Object topic = MarshallerUtils.unmarshal(ctx.config().getMarshaller(), req.topicBytes(),
-                        U.resolveClassLoader(ctx.config()), ctx.gridName());
+                    Object topic = MarshallerUtils.unmarshal(ctx.gridName(), ctx.config().getMarshaller(), req.topicBytes(),
+                        U.resolveClassLoader(ctx.config()));
 
                     ctx.io().send(nodeId, topic, res, SYSTEM_POOL);
                 }
@@ -441,8 +441,8 @@ public class GridTaskCommandHandler extends GridRestCommandHandlerAdapter {
                     res = (GridTaskResultResponse)msg;
 
                 try {
-                    res.result(MarshallerUtils.unmarshal(ctx.config().getMarshaller(), res.resultBytes(),
-                        U.resolveClassLoader(ctx.config()), ctx.gridName()));
+                    res.result(MarshallerUtils.unmarshal(ctx.gridName(), ctx.config().getMarshaller(), res.resultBytes(),
+                        U.resolveClassLoader(ctx.config())));
                 }
                 catch (IgniteCheckedException e) {
                     U.error(log, "Failed to unmarshal task result: " + res, e);

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestParser.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestParser.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestParser.java
index 8c14305..133d754 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestParser.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestParser.java
@@ -723,7 +723,7 @@ public class GridTcpRestParser implements GridNioParser {
         assert bytes != null;
 
         if ((flags & SERIALIZED_FLAG) != 0)
-            return MarshallerUtils.unmarshal(jdkMarshaller, bytes, null, gridName);
+            return MarshallerUtils.unmarshal(gridName, jdkMarshaller, bytes, null);
 
         int masked = flags & 0xff00;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
index 3c2317e..654114d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
@@ -1122,7 +1122,7 @@ public class GridServiceProcessor extends GridProcessorAdapter {
         if (cfg instanceof LazyServiceConfiguration) {
             byte[] bytes = ((LazyServiceConfiguration)cfg).serviceBytes();
 
-            Service srvc = MarshallerUtils.unmarshal(m, bytes, U.resolveClassLoader(null, ctx.config()), ctx.gridName());
+            Service srvc = MarshallerUtils.unmarshal(ctx.gridName(), m, bytes, U.resolveClassLoader(null, ctx.config()));
 
             ctx.resource().inject(srvc);
 
@@ -1134,8 +1134,8 @@ public class GridServiceProcessor extends GridProcessorAdapter {
             try {
                 byte[] bytes = MarshallerUtils.marshal(ctx, svc);
 
-                Service cp = MarshallerUtils.unmarshal(m, bytes, U.resolveClassLoader(svc.getClass().getClassLoader(),
-                    ctx.config()), ctx.gridName());
+                Service cp = MarshallerUtils.unmarshal(ctx.gridName(), m, bytes, U.resolveClassLoader(svc.getClass().getClassLoader(),
+                    ctx.config()));
 
                 ctx.resource().inject(cp);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskProcessor.java
index 7cb097f..9633a65 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskProcessor.java
@@ -1030,8 +1030,8 @@ public class GridTaskProcessor extends GridProcessorAdapter {
             boolean loc = ctx.localNodeId().equals(nodeId) && !ctx.config().isMarshalLocalJobs();
 
             Map<?, ?> attrs = loc ? msg.getAttributes() :
-                MarshallerUtils.<Map<?, ?>>unmarshal(marsh, msg.getAttributesBytes(),
-                    U.resolveClassLoader(task.getTask().getClass().getClassLoader(), ctx.config()), ctx.gridName());
+                MarshallerUtils.<Map<?, ?>>unmarshal(ctx.gridName(), marsh, msg.getAttributesBytes(),
+                    U.resolveClassLoader(task.getTask().getClass().getClassLoader(), ctx.config()));
 
             GridTaskSessionImpl ses = task.getSession();
 
@@ -1306,8 +1306,8 @@ public class GridTaskProcessor extends GridProcessorAdapter {
                     if (topic == null) {
                         assert req.topicBytes() != null;
 
-                        topic = MarshallerUtils.unmarshal(marsh, req.topicBytes(),
-                            U.resolveClassLoader(ctx.config()), ctx.gridName());
+                        topic = MarshallerUtils.unmarshal(ctx.gridName(), marsh, req.topicBytes(),
+                            U.resolveClassLoader(ctx.config()));
                     }
 
                     boolean loc = ctx.localNodeId().equals(nodeId);

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java
index 3089cc7..10942da 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java
@@ -775,16 +775,16 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject {
                     try {
                         boolean loc = ctx.localNodeId().equals(res.getNodeId()) && !ctx.config().isMarshalLocalJobs();
 
-                        Object res0 = loc ? res.getJobResult() : MarshallerUtils.unmarshal(marsh,
-                            res.getJobResultBytes(), U.resolveClassLoader(clsLdr, ctx.config()), ctx.gridName());
+                        Object res0 = loc ? res.getJobResult() : MarshallerUtils.unmarshal(ctx.gridName(), marsh,
+                            res.getJobResultBytes(), U.resolveClassLoader(clsLdr, ctx.config()));
 
                         IgniteException ex = loc ? res.getException() :
-                            MarshallerUtils.<IgniteException>unmarshal(marsh, res.getExceptionBytes(),
-                                U.resolveClassLoader(clsLdr, ctx.config()), ctx.gridName());
+                            MarshallerUtils.<IgniteException>unmarshal(ctx.gridName(), marsh, res.getExceptionBytes(),
+                                U.resolveClassLoader(clsLdr, ctx.config()));
 
                         Map<Object, Object> attrs = loc ? res.getJobAttributes() :
-                            MarshallerUtils.<Map<Object, Object>>unmarshal(marsh, res.getJobAttributesBytes(),
-                                U.resolveClassLoader(clsLdr, ctx.config()), ctx.gridName());
+                            MarshallerUtils.<Map<Object, Object>>unmarshal(ctx.gridName(), marsh, res.getJobAttributesBytes(),
+                                U.resolveClassLoader(clsLdr, ctx.config()));
 
                         jobRes.onResponse(res0, ex, attrs, res.isCancelled());
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/marshaller/MarshallerUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/marshaller/MarshallerUtils.java b/modules/core/src/main/java/org/apache/ignite/marshaller/MarshallerUtils.java
index c302351..6e2dab3 100644
--- a/modules/core/src/main/java/org/apache/ignite/marshaller/MarshallerUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/marshaller/MarshallerUtils.java
@@ -103,14 +103,14 @@ public class MarshallerUtils {
     /**
      * Unmarshal object and set grid name thread local.
      *
+     * @param name Grid name.
      * @param marsh Marshaller.
      * @param arr Binary data.
      * @param ldr Class loader.
-     * @param name Grid name.
      * @return Deserialized object.
      * @throws IgniteCheckedException If failed.
      */
-    public static <T> T unmarshal(Marshaller marsh, byte[] arr, @Nullable ClassLoader ldr, String name)
+    public static <T> T unmarshal(String name, Marshaller marsh, byte[] arr, @Nullable ClassLoader ldr)
         throws IgniteCheckedException {
         LocalGridName gridNameTl = gridName();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
index 61bdc2f..9211722 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
@@ -1266,7 +1266,7 @@ class ServerImpl extends TcpDiscoveryImpl {
             if (credBytes == null)
                 return null;
 
-            return MarshallerUtils.unmarshal(spi.marsh, credBytes, null, spi.ignite().name());
+            return MarshallerUtils.unmarshal(spi.ignite().name(), spi.marsh, credBytes, null);
         }
         catch (IgniteCheckedException e) {
             throw new IgniteSpiException("Failed to unmarshal node security credentials: " + node.id(), e);
@@ -2379,8 +2379,8 @@ class ServerImpl extends TcpDiscoveryImpl {
 
                         if (clientMsgWorker.clientNodeId.equals(node.id())) {
                             try {
-                                msg0 = MarshallerUtils.unmarshal(spi.marsh, msgBytes,
-                                    U.resolveClassLoader(spi.ignite().configuration()), spi.ignite().name());
+                                msg0 = MarshallerUtils.unmarshal(spi.ignite().name(), spi.marsh, msgBytes,
+                                    U.resolveClassLoader(spi.ignite().configuration()));
 
                                 prepareNodeAddedMessage(msg0, clientMsgWorker.clientNodeId, null, null, null);
 
@@ -3791,9 +3791,9 @@ class ServerImpl extends TcpDiscoveryImpl {
 
                             final IgniteConfiguration cfg = spi.ignite().configuration();
 
-                            SecurityContext coordSubj = MarshallerUtils.unmarshal(spi.marsh,
+                            SecurityContext coordSubj = MarshallerUtils.unmarshal(cfg.getGridName(), spi.marsh,
                                 node.<byte[]>attribute(IgniteNodeAttributes.ATTR_SECURITY_SUBJECT),
-                                U.resolveClassLoader(cfg), cfg.getGridName());
+                                U.resolveClassLoader(cfg));
 
                             if (!permissionsEqual(coordSubj.subject().permissions(), subj.subject().permissions())) {
                                 // Node has not pass authentication.

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
index 39dc9dc..1fb5482 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
@@ -1708,8 +1708,8 @@ public class TcpDiscoverySpi extends IgniteSpiAdapter implements DiscoverySpi, T
 
         for (Map.Entry<Integer, byte[]> entry : data.entrySet()) {
             try {
-                Serializable compData = MarshallerUtils.unmarshal(marsh, entry.getValue(), clsLdr,
-                        ignite.name());
+                Serializable compData = MarshallerUtils.unmarshal(ignite.name(), marsh, entry.getValue(), clsLdr
+                );
 
                 data0.put(entry.getKey(), compData);
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/4f459866/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java
index aa28118..ba19ade 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java
@@ -723,8 +723,8 @@ public class TcpDiscoveryMulticastIpFinder extends TcpDiscoveryVmIpFinder {
 
             this.data = data;
 
-            addrs = MarshallerUtils.unmarshal(marsh,
-                    Arrays.copyOfRange(data, U.IGNITE_HEADER.length, data.length), null, gridName);
+            addrs = MarshallerUtils.unmarshal(gridName, marsh,
+                    Arrays.copyOfRange(data, U.IGNITE_HEADER.length, data.length), null);
         }
 
         /**


Mime
View raw message