camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Schneider Christian <Christian.Schnei...@enbw.com>
Subject AW: Request -Reply using JMS
Date Fri, 20 Aug 2010 11:49:18 GMT
Hi Mohammed,

the class has been renamed to ProducerTemplate. You can find a complete example in the distribution.
It is named camel-example-spring-jms. The example also shows how to initialize the camel context
and how to retrieve the ProducerTemplate instance from the context.

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: Mohammed Yousuff [mailto:java2usuf@gmail.com] 
Gesendet: Freitag, 20. August 2010 13:45
An: users@camel.apache.org
Betreff: Re: Request -Reply using JMS


Thanks a lot Christian.

a quick question, i am using Came 2.3 Version .. does this version
has camelTemplate class? the reason because i can't import this class inside
my eclipse....




Regards,

Yousuff

My Tech Blog: http://passion4java.blogspot.com


On Fri, Aug 20, 2010 at 4:51 PM, Schneider Christian [via Camel] <
ml-node+2642022-607675364-102506@n5.nabble.com<ml-node%2B2642022-607675364-102506@n5.nabble.com>
> wrote:

> 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: [hidden email] <http://user/SendEmail.jtp?type=node&node=2642022&i=0>[mailto:[hidden
> email] <http://user/SendEmail.jtp?type=node&node=2642022&i=1>] Im Auftrag
> von john robens
> Gesendet: Freitag, 20. August 2010 13:04
> An: [hidden email] <http://user/SendEmail.jtp?type=node&node=2642022&i=2>
> Betreff: Re: Request -Reply using JMS
>
> You should be able to just call requestBody
>
> camelTemplate.requestBody()
>
>
>
> On 20 August 2010 21:01, Mohammed Yousuff <[hidden email]<http://user/SendEmail.jtp?type=node&node=2642022&i=3>>
> 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<http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642007.html?by-user=t>
> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
>
>
>
> --
> http://interlated.com.au <http://interlated.com.au?by-user=t>
> 0434 996 607
> Websites with Intelligence
>
>
> ------------------------------
>  View message @
> http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642022.html
> To unsubscribe from Request -Reply using JMS, click here<http://camel.465427.n5.nabble.com/template/NodeServlet.jtp?tpl=unsubscribe_by_code&node=2642007&code=amF2YTJ1c3VmQGdtYWlsLmNvbXwyNjQyMDA3fC0xNzA3NjkxNDA=>.
>
>
>

-- 
View this message in context: http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642035.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message