I don't know if Hessian has an HTTP server built-in, but I embedded
Jetty in my SE app to make it a Hessian end-point. It has been working
well this way for a while.
Here is the code I use to start up Jetty and configure the HessianServlet:
Server server = new Server(80);
Context root = new Context(server, "/myapp", Context.SESSIONS);
ServletHolder holder = new ServletHolder(new HessianServlet());
holder.setInitParameter("service-class",
"com.example.ServiceImplementation");
holder.setInitParameter("api-class",
"com.example.ServiceInterface");
root.addServlet(holder, "/my_hessian_endpoint");
server.start();
root.start();
Here are the imports:
import org.mortbay.jetty.Server;
import org.mortbay.jetty.servlet.Context;
import org.mortbay.jetty.servlet.ServletHolder;
Also, thanks for taking the initiative on getting those hessian issues
fixed. I would also really like to see improvements in Hessian and can
maybe contribute patches.
Sarel
On 5/23/2011 2:34 PM, Vincent Cantin wrote:
> Hello,
>
> I am developing an application where the server is running on the Mina
> library as a classical Java SE program. In my application, the
> communication between the server and the clients can be initiated by
> either the server of the client.
>
> I would like to use the Hessian library to create services on each of
> them (server& clients), but I am a little lost in the source code of
> Hessian for the server side, as I am not running in servlets at all.
>
> 1) Is there a tutorial or a sample that I could read where Hessian is
> used to do RPC on Java SE apps?
>
> 2) So far, I don't know exactly which classes I can reuse and which ones
> I have to write. Could you help me to figure it out, please?
>
> I would be glad to publish my sample Mina+Hessian back to the community
> once it is done.
>
> Regards,
> Vincent
>
>
>
> _______________________________________________
> hessian-interest mailing list
> [email protected]
> http://maillist.caucho.com/mailman/listinfo/hessian-interest
_______________________________________________
hessian-interest mailing list
[email protected]
http://maillist.caucho.com/mailman/listinfo/hessian-interest