Caucho’s Hessian
Hessian offers a binary HTTP-based remoting protocol. Spring supports Hessian via org.springframework.remoting.caucho.HessianProxyFactoryBean and org.springframework.remoting.caucho.HessianServiceExporter. Hessian is a slim, binary RPC protocol. It achieves cross-platform interoperability with minimal performance degradation. However, Hessian uses a custom reflection-based serialization mechanism which can be troublesome in certain scenarios.
HessianProxyFactoryBean is the FactoryBean for Hessian proxies. it exposes the proxied service for use as a bean reference, using the specified service interface. The service URL must be an HTTP URL exposing a Hessian service.
HessianServiceExporter is the servlet-API-based HTTP request handler that exports the specified service bean as Hessian service endpoint, accessible via a Hessian proxy. Hessian services exported with this class can be accessed by any Hessian client, as there isn’t any special handling involved. Spring also provides an alternative version of this exporter, for Sun’s JRE 1.6 HTTP server namely org.springframework.remoting.caucho.SimpleHessianServiceExporter. Configuring Hessian remoting technology in your application is as easy as configuring service exporter and client proxy in the Spring configuration file, applicationContext.xml as shown in Listing 19-10 and Listing 19-11 below respectively.
Listing 19-10. Service Exporter configuration in Spring configuration file applicationContext.xml in server side
1 2 3 4 |
<bean name="/loyaltyService" class="org.springframework.remoting.caucho.HessianServiceExporter"> <property name="service" ref="loyaltyService"/> <property name="serviceInterface" value="com.mybook.loyalty.services.LoyaltyService"/> </bean> |
Listing 19-11. Client proxy in Spring configuration file applicationContext.xml in client side
1 2 3 4 |
<bean id="loyaltyService"> <property name="serviceUrl" value="http://host:8081/loyalty/services/LoyaltyService"/> <property name="serviceInterface" value="com.mybook.loyalty.services.LoyaltyService"/> </bean> |
Caucho’s Burlap
Burlap is Caucho’s XML-based alternative to Hessian. Spring provides support classes such as org.springframework.remoting.caucho.BurlapProxyFactoryBean and org.springframework.remoting.caucho.BurlapServiceExporter. Burlap is a slim, XML-based RPC protocol.
BurlapProxyFactoryBean is the FactoryBean for Burlap proxies. It exposes the proxied service for use as a bean reference, using the specified service interface. The service URL must be an HTTP URL exposing a Burlap service.
BurlapServiceExporter is the servlet-API-based HTTP request handler that exports the specified service bean as Burlap service endpoint, accessible via a Burlap proxy. Spring also provides an alternative version of this exporter, for Sun’s JRE 1.6 HTTP server namely org.springframework.remoting.caucho.SimpleBurlapServiceExporter. Burlap services exported with this class can be accessed by any Burlap client, as there isn’t any special handling involved. Configuring Burlap remoting technology in your application is as easy as configuring service exporter and client proxy in the Spring configuration file, applicationContext.xml as shown in Listing 19-12 and Listing 19-13 below respectively.
Listing 19-12. Service Exporter configuration in Spring configuration file applicationContext.xml in server side
1 2 3 4 |
<bean name="/LoyaltyService"> <property name="service" ref="loyaltyService"/> <property name="serviceInterface" value="com.mybook.loyalty.services.LoyaltyService"/> </bean> |
Listing 19-13. Client proxy in Spring configuration file applicationContext.xml in client side
1 2 3 4 |
<bean id="loyaltyService"> <property name="serviceUrl" value="http://localhost:8081/loyalty/services/LoyaltyService"/> <property name="serviceInterface" value="com.mybook.loyalty.services.LoyaltyService"/> </bean> |
Page Visitors: 4585

Tomcy John

Latest posts by Tomcy John (see all)
- A Guide to Continuous Improvement for Architects - February 2, 2023
- Cloud-first Architecture Strategy - January 26, 2023
- Architecture Strategy and how to create One - January 24, 2023