I've finally committed my new HTTP invoker remoting strategy: It resides =
in the remoting.httpinvoker package.Usage is just like Hessian, Burlap, =
or RMI invoker: Simply define an HttpInvokerServiceExporter on the =
server side, and a corresponding HttpInvokerProxyFactoryBean on the =
client side. Use an HTTP URL just like with Hessian or Burlap, that's =
it.
=20
The main difference to Hessian is that this HTTP invoker uses Java =
serialization, just like RMI. It more or less combines the advantages of =
Hessian (HTTP-based, easy to set up) and RMI (full power of Java =
serialization). In particular, it should work nicely with Hibernate =
collections. It's about as fast as Hessian or RMI, so performance should =
not be an issue either.
=20
HttpInvokerProxyFactoryBean uses a HttpInvokerRequestExecutor strategy =
for the actual executing of HTTP POST requests. Default is =
SimpleHttpInvokerRequestExecutor, using J2SE's HttpURLConnection (so no =
external library necessary). Alternatively, there's =
CommonsHttpInvokerRequestExecutor which uses Jakarta Commons HttpClient, =
potentially with HTTP authentication, HTTP connection pooling, etc.
=20
I've also added the HTTP invoker as further remoting strategy to the =
JPetStore sample app. JPetStore's OrderService now gets exposed via 5 =
different remoting strategies: Hessian, Burlap, HTTP invoker, RMI, and =
JAX-RPC. Accordingly, the sample OrderServiceClient access the backend =
OrderService via all those strategies now. OrderServiceClient also gives =
rough performance measures.
=20
Juergen
|