spring-remoting调用的介绍
来源:互联网 发布:linux下安装chrome 编辑:程序博客网 时间:2024/06/05 07:42
1. 总体介绍
Spring目前提供了对HttpInvoker、Hessian、Burlap等Remoting技术的集成。
Spring屏蔽了这些实现技术的差异,用户只需开发简单的Java对象(Plain Old Java Objects,POJO)然后按照Spring规定的格式进行配置文件的编写即可,提高效率,而且几种调用方式之间可以平滑切换,只需要更改配置文件,不需要更改具体的代码。
2.客户端配置
<bean id="productServiceHessian" class="org.springframework.remoting.caucho.HessianProxyFactoryBean"> <property name="serviceUrl" value="http://127.0.0.1:8300/productService.servicehessian"/> <property name="serviceInterface" value="com.xxxxx.biz.service.ProductService"/> </bean> <bean id="productServiceBurlap" class="org.springframework.remoting.caucho.BurlapProxyFactoryBean"> <property name="serviceUrl" value="http://127.0.0.1:8300/productService.serviceburlap"/> <property name="serviceInterface" value="com.xxxxx.service.ProductService"/> </bean>
3. 服务端配置
<bean id="productService" class="com.xxxxx.service.impl.ProductServiceImpl"></bean><bean name="/productService.servicehessian" class="org.springframework.remoting.caucho.HessianServiceExporter"> <property name="service" ref="productService" /> <property name="serviceInterface" value="com.xxxxx.service.ProductService" /> </bean> <bean name="/productService.serviceburlap" class="org.springframework.remoting.caucho.BurlapServiceExporter"> <property name="service" ref="productService" /> <property name="serviceInterface" value="com.xxxxx.service.ProductService" /> </bean>
4. 单元测试
详细介绍见:http://blog.csdn.net/lsblsb/article/details/39930503
5. 其他
过程中遇到的小问题:
解决HessianProtocolException: expected string at 0x6d : http://blog.csdn.net/lsblsb/article/details/39994461
关于spring的httpinvoker调用详细介绍见:http://blog.csdn.net/lsblsb/article/details/39930503
参考:http://www.iteye.com/topic/417767
java 几种远程服务调用协议的比较:http://www.360doc.com/content/12/0220/13/2795334_188038946.shtml
0 0
- spring-remoting调用的介绍
- SPRING RMI Remoting调用实例
- com+.webservice.remoting 的介绍
- .NET Remoting 技术的介绍
- Dubbox中REST风格的远程调用(Restful Remoting)介绍
- spring:remoting
- Remoting远程处理事件调用的问题
- Remoting,调用远程对象的方法时就报错。
- Spring-remoting实现rmi调用及集群化方法
- Spring支持的Remoting实现技术
- spring框架对 remoting 支持的总结
- spring框架对 remoting 支持的总结
- .net remoting介绍
- 解决用Remoting调用远程对象时的超时问题
- Remoting、Reflection以及本地调用的性能测试比较
- 基于Remoting的远程调用_服务器端实现
- 基于Remoting的远程调用_客户端实现
- flex通过remoting调用java类的实现
- ASN.1 Encode an Object Identifier (OID) with OpenSSL
- 多线程经典面试题
- POJ 1743 Musical Theme Hash+二分
- PV操作例题解析
- 人眼的构造及其功能
- spring-remoting调用的介绍
- 大数加法的字符串实现
- linux下的ftp服务器搭建
- codeforces Round #272(div2) D解题报告
- 华为CaaS开放平台Newsletter 9月刊
- STL-deque,vector
- 二进制数据中含1的个数
- c#缓存介绍(转)
- JMeter使用技巧