1

如果我有一个界面

public interface TestService {
    public String getSomething();
}

和一堂课

import org.apache.ignite.services.Service;
import org.apache.ignite.services.ServiceContext;

public class TestServiceImpl implements Service, TestService {
    @Override
    public void init(ServiceContext ctx) throws Exception {
    }

    @Override
    public void execute(ServiceContext ctx) throws Exception {
    }

    @Override
    public void cancel(ServiceContext ctx) {
    }

    @Override
    public String getSomething() {
        return "HelloWorld";
    }
}

我将此服务部署在 ignite 服务器节点上

// Deploy services only on server nodes.
IgniteServices serverSvcs = ignite.services(ignite.cluster().forServers());

// Deploy cluster singleton.
serverSvcs.deployClusterSingleton("TestService", new TestServiceImpl());

并点燃客户端节点尝试获取服务

TestService testSvc = mIgnite.services().serviceProxy("TestService", TestService.class, false);

如果客户端节点不包含“TestServiceImpl”类,

将捕获异常消息:“无法找到具有给定类加载器的类以进行解组(确保所有类的相同版本在所有节点上可用或启用对等类加载)”,

ignite 客户端节点是否必须具有类 TestServiceImpl ?

4

1 回答 1

0

这已经修复,修复将在即将发布的 Ignite 1.6 中发布。与此同时,您可以下载每晚构建并检查它是否适合您:http: //ignite.apache.org/community/contribute.html#nightly-builds

于 2016-05-06T12:41:35.133 回答