Hessian protocol is used for integrate Hessian services, and it use http protocol to communicate and expose services by servlet.Dubbo use Jetty server as default servlet container.
Dubbo’s Hessian protocol interoperates with native Hessian services:
<dependency>
<groupId>com.caucho</groupId>
<artifactId>hessian</artifactId>
<version>4.0.7</version>
</dependency>
Serializable
interfaceList
, Map
, Number
, Date
, Calendar
interface, can only be implemented with the JDK, because Hessian2 will do some special treatment, Attribute values in the class will be lost.configure hessian protocol:
<dubbo:protocol name="hessian" port="8080" server="jetty" />
configure provider level default protocol:
<dubbo:provider protocol="hessian" />
configure service level default protocol:
<dubbo:service protocol="hessian" />
configure multiple port:
<dubbo:protocol id="hessian1" name="hessian" port="8080" />
<dubbo:protocol id="hessian2" name="hessian" port="8081" />
configure direct connect mode:
<dubbo:reference id="helloService" interface="HelloWorld" url="hessian://10.20.153.10:8080/helloWorld" />