diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/services/PlatformServices.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/services/PlatformServices.java index 2f3f1a2b84..705cf9c44f 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/services/PlatformServices.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/services/PlatformServices.java @@ -274,11 +274,9 @@ public class PlatformServices extends PlatformAbstractTarget { String mthdName = reader.readString(); Object[] args; - ServiceProxyHolder svcProxy = (ServiceProxyHolder)arg; if (reader.readBoolean()) { args = new Object[reader.readInt()]; - boolean keepBinary = srvKeepBinary || svcProxy.isPlatformService(); for (int i = 0; i < args.length; i++) args[i] = reader.readObjectDetached(); @@ -560,14 +558,6 @@ public class PlatformServices extends PlatformAbstractTarget { serviceClass = clazz; } - /** - * @return {@code true} if the target service is a {@link PlatformService} and {@code false} if the target - * service is a native Java service. - */ - public boolean isPlatformService() { - return PlatformService.class.isAssignableFrom(serviceClass); - } - /** * Invokes the proxy. * diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProxy.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProxy.java index 22ea071e1e..ab0422d488 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProxy.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProxy.java @@ -38,8 +38,6 @@ import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.IgniteException; import org.apache.ignite.IgniteLogger; -import org.apache.ignite.binary.BinaryObject; -import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.cluster.ClusterGroup; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.internal.GridClosureCallMode; @@ -47,7 +45,6 @@ import org.apache.ignite.internal.GridKernalContext; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException; import org.apache.ignite.internal.managers.communication.GridIoPolicy; -import org.apache.ignite.internal.processors.platform.services.PlatformService; import org.apache.ignite.internal.util.tostring.GridToStringExclude; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.X; @@ -418,17 +415,6 @@ public class GridServiceProxy implements Serializable { if (svcCtx == null || svcCtx.service() == null) throw new GridServiceNotFoundException(svcName); - final String PLATFORM_INVOKE_MTD_NAME = "invokeMethod"; - boolean isPlatformSvc = svcCtx.service() instanceof PlatformService; - boolean isProxied = false; - - if (isPlatformSvc && !PLATFORM_INVOKE_MTD_NAME.equals(mtdName)) { - isProxied = true; - args = new Object[] {mtdName, false, args}; - mtdName = "invokeMethod"; - argTypes = new Class[] {String.class, boolean.class, Object[].class}; - } - GridServiceMethodReflectKey key = new GridServiceMethodReflectKey(mtdName, argTypes); Method mtd = svcCtx.method(key); @@ -436,25 +422,12 @@ public class GridServiceProxy implements Serializable { if (mtd == null) throw new GridServiceMethodNotFoundException(svcName, mtdName, argTypes); - Object res; - try { - res = mtd.invoke(svcCtx.service(), args); + return mtd.invoke(svcCtx.service(), args); } catch (InvocationTargetException e) { throw new ServiceProxyException(e.getCause()); } - - if (isProxied && res instanceof BinaryObject) { - try { - res = ((BinaryObject)res).deserialize(); - } - catch (BinaryObjectException e) { - throw new ServiceProxyException(e); - } - } - - return res; } /** {@inheritDoc} */