文档中心 > 爱淘宝

RPC服务

更新时间:2015/09/18 访问次数:81173

RPC服务

请在tomcat/conf/custom下的ace4j-private.properties文件修改配置

rpc.registry.address=multicast://224.5.6.7:1234  

rpc.port=20880  

发布服务代码

ServiceConfig<HelloService> serviceConfig = new ServiceConfig<HelloService>();  

serviceConfig.setInterfaceClass(HelloService.class);  

RpcFactory.exportService(serviceConfig, new HelloServiceImpl());  

消费服务代码

ReferenceConfig<HelloService> referenceConfig = new ReferenceConfig<HelloService>();  

referenceConfig.setInterfaceClass(HelloService.class);  

HelloService reference = RpcFactory.getReference(referenceConfig); 

FAQ

关于此文档暂时还没有FAQ
返回
顶部