Basically the following should work: On the client side: yourResponse = camelTemplate.sendBody("jms:queue:yourqueue", ExchangePattern.InOut, yourObject);
On the server side: from("jms:queue:yourqueue").to("bean:yourbean?method=yourmethod") The class behind your bean should have the named method which looks like this: YourReponseClass yourmethod(YourRequestClass) {...} That is all. The whole request reply thing is done by camelTemplate and the jms endpoint. If your do not want to use cameltemplate in your client you can also use the pojo producing. See http://camel.apache.org/pojo-producing.html Greetings Christian Christian Schneider Informationsverarbeitung Business Solutions Handel und Dispatching Tel : +49-(0)721-63-15482 EnBW Systeme Infrastruktur Support GmbH Sitz der Gesellschaft: Karlsruhe Handelsregister: Amtsgericht Mannheim HRB 108550 Vorsitzender des Aufsichtsrats: Dr. Bernhard Beck Geschäftsführer: Jochen Adenau, Hans-Günther Meier -----Ursprüngliche Nachricht----- Von: jrobenss...@gmail.com [mailto:jrobenss...@gmail.com] Im Auftrag von john robens Gesendet: Freitag, 20. August 2010 13:04 An: users@camel.apache.org Betreff: Re: Request -Reply using JMS You should be able to just call requestBody camelTemplate.requestBody() On 20 August 2010 21:01, Mohammed Yousuff <java2u...@gmail.com> wrote: > > I am trying to send sterilized object to JMS and should get the response back > using request-response EIP pattern. I am try to find some example which does > the same.. > > I saw the example code for request-response in Apache camel site, but not > able to understand what it really happening. > > Below are the steps which I am try to do using Camel . > > 1. A Object should be send to JBOSS JMS queue (I configured JBOSS queue > and able to post messages), but not sure how to send a object to the JMS > Server. > 2. Then need to set JMSReplyTo() and correlation ID and then sent to the > MDB. > 3. Once the MDB processed, it should return back to listener class. > 4. The client should check the response asynchronous. > > I would appreciate if you can share any on the steps which you may know. > Thank you > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642007.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- http://interlated.com.au 0434 996 607 Websites with Intelligence