You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Emmanuel Bourg <eb...@apache.org> on 2011/05/06 12:01:55 UTC

Re: RPC over AMQP with Hessian

Hi,

Thanks to the availability of the Maven artifacts with the 0.10 release 
I've been able to finalize the library to do Hessian remote procedure 
calls over AMQP. A documentation is available with complete code 
examples on Github:

http://ebourg.github.com/qpid-hessian

The library is also available through Maven.

   <dependency>
     <groupId>org.apache-extras.qpid</groupId>
     <artifactId>qpid-hessian</artifactId>
     <version>1.0</version>
   </dependency>

Emmanuel Bourg


Le 26/05/2010 14:01, Emmanuel Bourg a écrit :
> Hi,
>
> I've done some request/response work with Qpid lately, and I implemented
> a Hessian layer to make it easier. I'd like to share it here if ever
> someone find it useful. The source code is available there:
>
> http://github.com/ebourg/qpid-hessian
>
>
> If you've already worked with Hessian to do RPC over HTTP the principle
> is almost identical:
>
> 1. Create an interface defining the methods exposed:
>
> public interface EchoService {
> String echo(String message);
> }
>
>
> 2. Implement the interface and extend the HessianEndpoint class
> (this is the equivalent of the HessianServlet):
>
> public class EchoServiceEndpoint extends HessianEndpoint
> implements EchoService {
>
> public String echo(String message) {
> return message;
> }
> }
>
>
> 3. Deploy the endpoint by attaching it to a Qpid session:
>
> EchoServiceEndpoint endpoint = new EchoServiceEndpoint();
> endpoint.run(session);
>
>
> 4. On the client side, create a proxy of the interface:
>
> AMQPHessianProxyFactory factory = new AMQPHessianProxyFactory();
> EchoService service = factory.create(EchoService.class,
> "qpid://guest:guest@localhost/test");
>
>
> 5. The service is ready to be consumed!
>
> String echo = service.echo("Hello Qpid!");
>
>
>
> Emmanuel Bourg
>


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: RPC over AMQP with Hessian

Posted by Gordon Sim <gs...@redhat.com>.
On 05/06/2011 11:01 AM, Emmanuel Bourg wrote:
> Hi,
>
> Thanks to the availability of the Maven artifacts with the 0.10 release
> I've been able to finalize the library to do Hessian remote procedure
> calls over AMQP. A documentation is available with complete code
> examples on Github:
>
> http://ebourg.github.com/qpid-hessian

Cool! We should have a link to things like this from the qpid page 
(assuming authors of linked to projects are ok with that of course!).

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org