You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Schneider Christian <Ch...@enbw.com> on 2010/08/20 13:21:05 UTC
AW: Request -Reply using JMS
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: jrobensster@gmail.com [mailto:jrobensster@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 <ja...@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
Re: Request -Reply using JMS
Posted by Claus Ibsen <cl...@gmail.com>.
JBoss ESB 4.9 will ship with support for Camel out of the box.
Then I am sure any weird classloading in the ESB would have been
resolved by the JBoss people.
There was some twitter tweets about this.
And here is a link to some documentation about it. JBoss most likely
got other docs as well.
http://community.jboss.org/wiki/CamelGatewayUsingnon-coreComponents
http://community.jboss.org/thread/148540
http://docs.jboss.org/jbossesb/docs/4.9/manuals/html/Release_Notes/index.html
On Sun, Aug 22, 2010 at 2:34 PM, Mohammed Yousuff <ja...@gmail.com> wrote:
>
> Thanks for your update Christian.
>
> i have deployed the camel-example-spring-jms server code as Jar file in
> JBOSS 4.2 server. I am loading the camel-server.xml when the Client calls
> the simple MDB.
>
> I getting below exception when the spring files are getting loaded, i have
> tried for long time and i don't have any clue on this. Below are the details
> steps which i have followed to set this up.please let me know if you have
> any thoughts.
>
> * Client send the message to JBOSS JMS queue.
>
> * Before starting the JBOSS, i also placed JBOSS camel resolver jar in the
> following path Jboss/server/default/lib (as per the steps listed in
> http://codeandtell.wordpress.com/2009/02/26/apache-camel-jboss-5/)
>
> * A Simple MDB receives the messages and i am loading the "camel-server.xml"
> using ClassPathXmlApplicationContext.
>
> * i have also added the below content inside the spring xml file
>
> <bean id="jbossResolver"
> class="org.apache.camel.jboss.JBossPackageScanClassResolver"/>
>
>
> * I am getting below exception when the spring tries to initiate the below
> xml snipped.
>
> <camel:camelContext id="camel">
> <camel:package>org.apache.camel.example.server</camel:package>
> <!-- enable JMX connector so we can connect to the server and browse
> mbeans -->
> <!-- Camel will log at INFO level the service URI to use for
> connecting with jconsole -->
> <camel:jmxAgent id="agent" createConnector="true"/>
> </camel:camelContext>
>
>
> Exception:
> 18:03:22,953 INFO [STDOUT] I am a NEW MDB-- Say Hello!!!
> 18:03:22,953 INFO [ClassPathXmlApplicationContext] Refreshing
> org.springframework.context.support.ClassPathXmlApplicationContext@cd666f:
> display name
> [org.springframework.context.support.ClassPathXmlApplicationContext@cd666f];
> startup date [Sun Aug 22 18:03:22 IST 2010]; root of context hierarchy
> 18:03:22,953 INFO [XmlBeanDefinitionReader] Loading XML bean definitions
> from class path resource [camel-server.xml]
> 18:03:23,062 INFO [STDOUT]
> org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected
> exception parsing XML document from class path resource [camel-server.xml];
> nested exception is java.lang.NoSuchMethodError:
> javax.xml.bind.annotation.XmlAccessorType.value()Ljavax/xml/bind/annotation/AccessType;
> 18:03:23,062 INFO [STDOUT] at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)
> 18:03:23,062 INFO [STDOUT] at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
> 18:03:23,062 INFO [STDOUT] at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
> 18:03:23,062 INFO [STDOUT] at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
> 18:03:23,062 INFO [STDOUT] at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
> 18:03:23,062 INFO [STDOUT] at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
> 18:03:23,062 INFO [STDOUT] at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212)
> 18:03:23,062 INFO [STDOUT] at
> org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
> 18:03:23,062 INFO [STDOUT] at
> org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:80)
> 18:03:23,062 INFO [STDOUT] at
> org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
> 18:03:23,062 INFO [STDOUT] at
> org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
> 18:03:23,062 INFO [STDOUT] at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
> 18:03:23,062 INFO [STDOUT] at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
> 18:03:23,062 INFO [STDOUT] at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
> 18:03:23,062 INFO [STDOUT] at
> com.passion4java.jms.ServerMDB.onMessage(ServerMDB.java:45)
> 18:03:23,062 INFO [STDOUT] at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 18:03:23,062 INFO [STDOUT] at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 18:03:23,062 INFO [STDOUT] at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 18:03:23,062 INFO [STDOUT] at
> java.lang.reflect.Method.invoke(Method.java:592)
> 18:03:23,062 INFO [STDOUT] at
> org.jboss.invocation.Invocation.performCall(Invocation.java:345)
> 18:03:23,062 INFO [STDOUT] at
> org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:475)
> 18:03:23,062 INFO [STDOUT] at
> org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)
> 18:03:23,062 INFO [STDOUT] at
> org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
> 18:03:23,062 INFO [STDOUT] at
> org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
> 18:03:23,062 INFO [STDOUT] at
> org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:158)
> 18:03:23,062 INFO [STDOUT] at
> org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT.invoke(MessageDrivenTxInterceptorBMT.java:32)
> 18:03:23,062 INFO [STDOUT] at
> org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:101)
> 18:03:23,062 INFO [STDOUT] at
> org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:94)
> 18:03:23,062 INFO [STDOUT] at
> org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
> 18:03:23,062 INFO [STDOUT] at
> org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
> 18:03:23,062 INFO [STDOUT] at
> org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389)
> 18:03:23,062 INFO [STDOUT] at
> org.jboss.ejb.Container.invoke(Container.java:873)
> 18:03:23,062 INFO [STDOUT] at
> org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1077)
> 18:03:23,062 INFO [STDOUT] at
> org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1379)
> 18:03:23,062 INFO [STDOUT] at
> org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)
> 18:03:23,062 INFO [STDOUT] at
> org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:904)
> 18:03:23,062 INFO [STDOUT] at
> org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:160)
> 18:03:23,062 INFO [STDOUT] at
> org.jboss.mq.SpySession.run(SpySession.java:333)
> 18:03:23,062 INFO [STDOUT] at
> org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
> 18:03:23,062 INFO [STDOUT] at
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
> 18:03:23,062 INFO [STDOUT] at java.lang.Thread.run(Thread.java:595)
> 18:03:23,062 INFO [STDOUT] Caused by: java.lang.NoSuchMethodError:
> javax.xml.bind.annotation.XmlAccessorType.value()Ljavax/xml/bind/annotation/AccessType;
> 18:03:23,062 INFO [STDOUT] at
> com.sun.xml.bind.v2.model.impl.ClassInfoImpl.getAccessType(ClassInfoImpl.java:339)
> 18:03:23,062 INFO [STDOUT] at
> com.sun.xml.bind.v2.model.impl.ClassInfoImpl.getProperties(ClassInfoImpl.java:228)
> 18:03:23,062 INFO [STDOUT] at
> com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl.getProperties(RuntimeClassInfoImpl.java:87)
> 18:03:23,062 INFO [STDOUT] at
> com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:127)
> 18:03:23,062 INFO [STDOUT] at
> com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:49)
> 18:03:23,062 INFO [STDOUT] at
> com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:41)
> 18:03:23,062 INFO [STDOUT] at
> com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:189)
> 18:03:23,062 INFO [STDOUT] at
> com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:204)
> 18:03:23,062 INFO [STDOUT] at
> com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:327)
> 18:03:23,062 INFO [STDOUT] at
> com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:198)
> 18:03:23,062 INFO [STDOUT] at
> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:76)
> 18:03:23,062 INFO [STDOUT] at
> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:55)
> 18:03:23,062 INFO [STDOUT] at
> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:124)
> 18:03:23,062 INFO [STDOUT] at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 18:03:23,062 INFO [STDOUT] at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 18:03:23,062 INFO [STDOUT] at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 18:03:23,062 INFO [STDOUT] at
> java.lang.reflect.Method.invoke(Method.java:592)
> 18:03:23,062 INFO [STDOUT] at
> javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:133)
> 18:03:23,062 INFO [STDOUT] at
> javax.xml.bind.ContextFinder.find(ContextFinder.java:286)
> 18:03:23,062 INFO [STDOUT] at
> javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
> 18:03:23,062 INFO [STDOUT] at
> javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
> 18:03:23,062 INFO [STDOUT] at
> org.apache.camel.spring.handler.CamelNamespaceHandler.createJaxbContext(CamelNamespaceHandler.java:163)
> 18:03:23,062 INFO [STDOUT] at
> org.apache.camel.spring.handler.CamelNamespaceHandler.getJaxbContext(CamelNamespaceHandler.java:150)
> 18:03:23,062 INFO [STDOUT] at
> org.apache.camel.spring.handler.CamelNamespaceHandler.parseUsingJaxb(CamelNamespaceHandler.java:141)
> 18:03:23,062 INFO [STDOUT] at
> org.apache.camel.spring.handler.CamelNamespaceHandler$CamelContextBeanDefinitionParser.doParse(CamelNamespaceHandler.java:196)
> 18:03:23,062 INFO [STDOUT] at
> org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:84)
> 18:03:23,062 INFO [STDOUT] at
> org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:56)
> 18:03:23,062 INFO [STDOUT] at
> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)
> 18:03:23,062 INFO [STDOUT] at
> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297)
> 18:03:23,062 INFO [STDOUT] at
> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)
> 18:03:23,062 INFO [STDOUT] at
> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
> 18:03:23,062 INFO [STDOUT] at
> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
> 18:03:23,062 INFO [STDOUT] at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)
> 18:03:23,062 INFO [STDOUT] at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)
> 18:03:23,062 INFO [STDOUT] ... 40 more
>
>
>
>
>
>
>
>
>
> Regards,
>
> Yousuff
>
> My Tech Blog: http://passion4java.blogspot.com
>
>
> On Fri, Aug 20, 2010 at 6:40 PM, Schneider Christian [via Camel] <
> ml-node+2642131-490868617-102506@n5.nabble.com<ml...@n5.nabble.com>
>> wrote:
>
>> You can simply execute the following with maven like described in the
>> readme:
>>
>> mvn exec:java -PCamelServer
>>
>> Inside the pom file you can see how it works. There is a generic start
>> class org.apache.camel.spring.Main in the distribution that simply starts up
>> a spring context with a given config. Alternatively you can of course write
>> your own class with a main method that starts the spring context.
>>
>> I often deploy into tomcat as a war archive. You can look at the wsdl first
>> example from cxf if you are interested in this. The method that is shown
>> there can also be used for camel apps.
>>
>> 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:[hidden email]<http://user/SendEmail.jtp?type=node&node=2642131&i=0>]
>>
>> Gesendet: Freitag, 20. August 2010 14:49
>> An: [hidden email] <http://user/SendEmail.jtp?type=node&node=2642131&i=1>
>> Betreff: Re: Request -Reply using JMS
>>
>>
>> i have gone throw the example. You are right.. Examples are similar of what
>>
>> I am expecting. I have executed the client version and not sure how to
>> deploy the server version of this example.
>>
>>
>> I am using JBOSS 4.2 as my appserver, can you please throw me some lights
>> on
>> this.
>>
>>
>>
>> Regards,
>>
>> Yousuff
>>
>> My Tech Blog: http://passion4java.blogspot.com<http://passion4java.blogspot.com?by-user=t>
>>
>>
>> On Fri, Aug 20, 2010 at 5:19 PM, Schneider Christian [via Camel] <
>> [hidden email] <http://user/SendEmail.jtp?type=node&node=2642131&i=2><[hidden
>> email] <http://user/SendEmail.jtp?type=node&node=2642131&i=3>>
>> > wrote:
>>
>> > 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:[hidden email]<
>> http://user/SendEmail.jtp?type=node&node=2642044&i=0>]
>> >
>> > Gesendet: Freitag, 20. August 2010 13:45
>> > An: [hidden email] <http://user/SendEmail.jtp?type=node&node=2642044&i=1>
>>
>> > 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<http://passion4java.blogspot.com?by-user=t>
>> <http://passion4java.blogspot.com?by-user=t<http://passion4java.blogspot.com?by-user=t&by-user=t>>
>>
>> >
>> >
>> > On Fri, Aug 20, 2010 at 4:51 PM, Schneider Christian [via Camel] <
>> > [hidden email] <http://user/SendEmail.jtp?type=node&node=2642044&i=2><[hidden
>>
>> > email] <http://user/SendEmail.jtp?type=node&node=2642044&i=3>>
>> > > 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>
>> <
>> http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642007.html?by-user=t<http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642007.html?by-user=t&by-user=t>>
>>
>> > <
>> >
>> http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642007.html?by-user=t<http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642007.html?by-user=t&by-user=t>
>> <
>> http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642007.html?by-user=t&by-user=t<http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642007.html?by-user=t&by-user=t&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> <
>> http://interlated.com.au?by-user=t<http://interlated.com.au?by-user=t&by-user=t>>
>> <
>> > http://interlated.com.au?by-user=t<http://interlated.com.au?by-user=t&by-user=t>
>> <http://interlated.com.au?by-user=t&by-user=t<http://interlated.com.au?by-user=t&by-user=t&by-user=t>>>
>>
>> >
>> > > 0434 996 607
>> > > Websites with Intelligence
>> > >
>> > >
>> > > ------------------------------
>> > > View message @
>> > >
>> >
>> http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642022.html<http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642022.html?by-user=t>
>> <
>> http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642022.html?by-user=t<http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642022.html?by-user=t&by-user=t>>
>>
>> > > 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=<http://camel.465427.n5.nabble.com/template/NodeServlet.jtp?tpl=unsubscribe_by_code&node=2642007&code=amF2YTJ1c3VmQGdtYWlsLmNvbXwyNjQyMDA3fC0xNzA3NjkxNDA=&by-user=t>
>> <
>> http://camel.465427.n5.nabble.com/template/NodeServlet.jtp?tpl=unsubscribe_by_code&node=2642007&code=amF2YTJ1c3VmQGdtYWlsLmNvbXwyNjQyMDA3fC0xNzA3NjkxNDA=&by-user=t<http://camel.465427.n5.nabble.com/template/NodeServlet.jtp?tpl=unsubscribe_by_code&node=2642007&code=amF2YTJ1c3VmQGdtYWlsLmNvbXwyNjQyMDA3fC0xNzA3NjkxNDA=&by-user=t&by-user=t>>>.
>>
>> >
>> > >
>> > >
>> > >
>> >
>> > --
>> > View this message in context:
>> >
>> http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642035.html<http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642035.html?by-user=t>
>> <
>> http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642035.html?by-user=t<http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642035.html?by-user=t&by-user=t>>
>>
>> >
>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>> >
>> >
>> > ------------------------------
>> > View message @
>> >
>> http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642044.html<http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642044.html?by-user=t>
>> > 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=<http://camel.465427.n5.nabble.com/template/NodeServlet.jtp?tpl=unsubscribe_by_code&node=2642007&code=amF2YTJ1c3VmQGdtYWlsLmNvbXwyNjQyMDA3fC0xNzA3NjkxNDA=&by-user=t>>.
>>
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642104.html<http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642104.html?by-user=t>
>>
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>> ------------------------------
>> View message @
>> http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642131.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-tp2642007p2643738.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
--
Claus Ibsen
Apache Camel Committer
Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Re: Request -Reply using JMS
Posted by Mohammed Yousuff <ja...@gmail.com>.
Thanks for your update Christian.
i have deployed the camel-example-spring-jms server code as Jar file in
JBOSS 4.2 server. I am loading the camel-server.xml when the Client calls
the simple MDB.
I getting below exception when the spring files are getting loaded, i have
tried for long time and i don't have any clue on this. Below are the details
steps which i have followed to set this up.please let me know if you have
any thoughts.
* Client send the message to JBOSS JMS queue.
* Before starting the JBOSS, i also placed JBOSS camel resolver jar in the
following path Jboss/server/default/lib (as per the steps listed in
http://codeandtell.wordpress.com/2009/02/26/apache-camel-jboss-5/)
* A Simple MDB receives the messages and i am loading the "camel-server.xml"
using ClassPathXmlApplicationContext.
* i have also added the below content inside the spring xml file
<bean id="jbossResolver"
class="org.apache.camel.jboss.JBossPackageScanClassResolver"/>
* I am getting below exception when the spring tries to initiate the below
xml snipped.
<camel:camelContext id="camel">
<camel:package>org.apache.camel.example.server</camel:package>
<!-- enable JMX connector so we can connect to the server and browse
mbeans -->
<!-- Camel will log at INFO level the service URI to use for
connecting with jconsole -->
<camel:jmxAgent id="agent" createConnector="true"/>
</camel:camelContext>
Exception:
18:03:22,953 INFO [STDOUT] I am a NEW MDB-- Say Hello!!!
18:03:22,953 INFO [ClassPathXmlApplicationContext] Refreshing
org.springframework.context.support.ClassPathXmlApplicationContext@cd666f:
display name
[org.springframework.context.support.ClassPathXmlApplicationContext@cd666f];
startup date [Sun Aug 22 18:03:22 IST 2010]; root of context hierarchy
18:03:22,953 INFO [XmlBeanDefinitionReader] Loading XML bean definitions
from class path resource [camel-server.xml]
18:03:23,062 INFO [STDOUT]
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected
exception parsing XML document from class path resource [camel-server.xml];
nested exception is java.lang.NoSuchMethodError:
javax.xml.bind.annotation.XmlAccessorType.value()Ljavax/xml/bind/annotation/AccessType;
18:03:23,062 INFO [STDOUT] at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)
18:03:23,062 INFO [STDOUT] at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
18:03:23,062 INFO [STDOUT] at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
18:03:23,062 INFO [STDOUT] at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
18:03:23,062 INFO [STDOUT] at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
18:03:23,062 INFO [STDOUT] at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
18:03:23,062 INFO [STDOUT] at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212)
18:03:23,062 INFO [STDOUT] at
org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
18:03:23,062 INFO [STDOUT] at
org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:80)
18:03:23,062 INFO [STDOUT] at
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
18:03:23,062 INFO [STDOUT] at
org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
18:03:23,062 INFO [STDOUT] at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
18:03:23,062 INFO [STDOUT] at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
18:03:23,062 INFO [STDOUT] at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
18:03:23,062 INFO [STDOUT] at
com.passion4java.jms.ServerMDB.onMessage(ServerMDB.java:45)
18:03:23,062 INFO [STDOUT] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
18:03:23,062 INFO [STDOUT] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
18:03:23,062 INFO [STDOUT] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
18:03:23,062 INFO [STDOUT] at
java.lang.reflect.Method.invoke(Method.java:592)
18:03:23,062 INFO [STDOUT] at
org.jboss.invocation.Invocation.performCall(Invocation.java:345)
18:03:23,062 INFO [STDOUT] at
org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:475)
18:03:23,062 INFO [STDOUT] at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)
18:03:23,062 INFO [STDOUT] at
org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
18:03:23,062 INFO [STDOUT] at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
18:03:23,062 INFO [STDOUT] at
org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:158)
18:03:23,062 INFO [STDOUT] at
org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT.invoke(MessageDrivenTxInterceptorBMT.java:32)
18:03:23,062 INFO [STDOUT] at
org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:101)
18:03:23,062 INFO [STDOUT] at
org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:94)
18:03:23,062 INFO [STDOUT] at
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
18:03:23,062 INFO [STDOUT] at
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
18:03:23,062 INFO [STDOUT] at
org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389)
18:03:23,062 INFO [STDOUT] at
org.jboss.ejb.Container.invoke(Container.java:873)
18:03:23,062 INFO [STDOUT] at
org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1077)
18:03:23,062 INFO [STDOUT] at
org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1379)
18:03:23,062 INFO [STDOUT] at
org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)
18:03:23,062 INFO [STDOUT] at
org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:904)
18:03:23,062 INFO [STDOUT] at
org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:160)
18:03:23,062 INFO [STDOUT] at
org.jboss.mq.SpySession.run(SpySession.java:333)
18:03:23,062 INFO [STDOUT] at
org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
18:03:23,062 INFO [STDOUT] at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
18:03:23,062 INFO [STDOUT] at java.lang.Thread.run(Thread.java:595)
18:03:23,062 INFO [STDOUT] Caused by: java.lang.NoSuchMethodError:
javax.xml.bind.annotation.XmlAccessorType.value()Ljavax/xml/bind/annotation/AccessType;
18:03:23,062 INFO [STDOUT] at
com.sun.xml.bind.v2.model.impl.ClassInfoImpl.getAccessType(ClassInfoImpl.java:339)
18:03:23,062 INFO [STDOUT] at
com.sun.xml.bind.v2.model.impl.ClassInfoImpl.getProperties(ClassInfoImpl.java:228)
18:03:23,062 INFO [STDOUT] at
com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl.getProperties(RuntimeClassInfoImpl.java:87)
18:03:23,062 INFO [STDOUT] at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:127)
18:03:23,062 INFO [STDOUT] at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:49)
18:03:23,062 INFO [STDOUT] at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:41)
18:03:23,062 INFO [STDOUT] at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:189)
18:03:23,062 INFO [STDOUT] at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:204)
18:03:23,062 INFO [STDOUT] at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:327)
18:03:23,062 INFO [STDOUT] at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:198)
18:03:23,062 INFO [STDOUT] at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:76)
18:03:23,062 INFO [STDOUT] at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:55)
18:03:23,062 INFO [STDOUT] at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:124)
18:03:23,062 INFO [STDOUT] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
18:03:23,062 INFO [STDOUT] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
18:03:23,062 INFO [STDOUT] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
18:03:23,062 INFO [STDOUT] at
java.lang.reflect.Method.invoke(Method.java:592)
18:03:23,062 INFO [STDOUT] at
javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:133)
18:03:23,062 INFO [STDOUT] at
javax.xml.bind.ContextFinder.find(ContextFinder.java:286)
18:03:23,062 INFO [STDOUT] at
javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
18:03:23,062 INFO [STDOUT] at
javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
18:03:23,062 INFO [STDOUT] at
org.apache.camel.spring.handler.CamelNamespaceHandler.createJaxbContext(CamelNamespaceHandler.java:163)
18:03:23,062 INFO [STDOUT] at
org.apache.camel.spring.handler.CamelNamespaceHandler.getJaxbContext(CamelNamespaceHandler.java:150)
18:03:23,062 INFO [STDOUT] at
org.apache.camel.spring.handler.CamelNamespaceHandler.parseUsingJaxb(CamelNamespaceHandler.java:141)
18:03:23,062 INFO [STDOUT] at
org.apache.camel.spring.handler.CamelNamespaceHandler$CamelContextBeanDefinitionParser.doParse(CamelNamespaceHandler.java:196)
18:03:23,062 INFO [STDOUT] at
org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:84)
18:03:23,062 INFO [STDOUT] at
org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:56)
18:03:23,062 INFO [STDOUT] at
org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)
18:03:23,062 INFO [STDOUT] at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297)
18:03:23,062 INFO [STDOUT] at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)
18:03:23,062 INFO [STDOUT] at
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
18:03:23,062 INFO [STDOUT] at
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
18:03:23,062 INFO [STDOUT] at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)
18:03:23,062 INFO [STDOUT] at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)
18:03:23,062 INFO [STDOUT] ... 40 more
Regards,
Yousuff
My Tech Blog: http://passion4java.blogspot.com
On Fri, Aug 20, 2010 at 6:40 PM, Schneider Christian [via Camel] <
ml-node+2642131-490868617-102506@n5.nabble.com<ml...@n5.nabble.com>
> wrote:
> You can simply execute the following with maven like described in the
> readme:
>
> mvn exec:java -PCamelServer
>
> Inside the pom file you can see how it works. There is a generic start
> class org.apache.camel.spring.Main in the distribution that simply starts up
> a spring context with a given config. Alternatively you can of course write
> your own class with a main method that starts the spring context.
>
> I often deploy into tomcat as a war archive. You can look at the wsdl first
> example from cxf if you are interested in this. The method that is shown
> there can also be used for camel apps.
>
> 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:[hidden email]<http://user/SendEmail.jtp?type=node&node=2642131&i=0>]
>
> Gesendet: Freitag, 20. August 2010 14:49
> An: [hidden email] <http://user/SendEmail.jtp?type=node&node=2642131&i=1>
> Betreff: Re: Request -Reply using JMS
>
>
> i have gone throw the example. You are right.. Examples are similar of what
>
> I am expecting. I have executed the client version and not sure how to
> deploy the server version of this example.
>
>
> I am using JBOSS 4.2 as my appserver, can you please throw me some lights
> on
> this.
>
>
>
> Regards,
>
> Yousuff
>
> My Tech Blog: http://passion4java.blogspot.com<http://passion4java.blogspot.com?by-user=t>
>
>
> On Fri, Aug 20, 2010 at 5:19 PM, Schneider Christian [via Camel] <
> [hidden email] <http://user/SendEmail.jtp?type=node&node=2642131&i=2><[hidden
> email] <http://user/SendEmail.jtp?type=node&node=2642131&i=3>>
> > wrote:
>
> > 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:[hidden email]<
> http://user/SendEmail.jtp?type=node&node=2642044&i=0>]
> >
> > Gesendet: Freitag, 20. August 2010 13:45
> > An: [hidden email] <http://user/SendEmail.jtp?type=node&node=2642044&i=1>
>
> > 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<http://passion4java.blogspot.com?by-user=t>
> <http://passion4java.blogspot.com?by-user=t<http://passion4java.blogspot.com?by-user=t&by-user=t>>
>
> >
> >
> > On Fri, Aug 20, 2010 at 4:51 PM, Schneider Christian [via Camel] <
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=2642044&i=2><[hidden
>
> > email] <http://user/SendEmail.jtp?type=node&node=2642044&i=3>>
> > > 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>
> <
> http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642007.html?by-user=t<http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642007.html?by-user=t&by-user=t>>
>
> > <
> >
> http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642007.html?by-user=t<http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642007.html?by-user=t&by-user=t>
> <
> http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642007.html?by-user=t&by-user=t<http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642007.html?by-user=t&by-user=t&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> <
> http://interlated.com.au?by-user=t<http://interlated.com.au?by-user=t&by-user=t>>
> <
> > http://interlated.com.au?by-user=t<http://interlated.com.au?by-user=t&by-user=t>
> <http://interlated.com.au?by-user=t&by-user=t<http://interlated.com.au?by-user=t&by-user=t&by-user=t>>>
>
> >
> > > 0434 996 607
> > > Websites with Intelligence
> > >
> > >
> > > ------------------------------
> > > View message @
> > >
> >
> http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642022.html<http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642022.html?by-user=t>
> <
> http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642022.html?by-user=t<http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642022.html?by-user=t&by-user=t>>
>
> > > 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=<http://camel.465427.n5.nabble.com/template/NodeServlet.jtp?tpl=unsubscribe_by_code&node=2642007&code=amF2YTJ1c3VmQGdtYWlsLmNvbXwyNjQyMDA3fC0xNzA3NjkxNDA=&by-user=t>
> <
> http://camel.465427.n5.nabble.com/template/NodeServlet.jtp?tpl=unsubscribe_by_code&node=2642007&code=amF2YTJ1c3VmQGdtYWlsLmNvbXwyNjQyMDA3fC0xNzA3NjkxNDA=&by-user=t<http://camel.465427.n5.nabble.com/template/NodeServlet.jtp?tpl=unsubscribe_by_code&node=2642007&code=amF2YTJ1c3VmQGdtYWlsLmNvbXwyNjQyMDA3fC0xNzA3NjkxNDA=&by-user=t&by-user=t>>>.
>
> >
> > >
> > >
> > >
> >
> > --
> > View this message in context:
> >
> http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642035.html<http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642035.html?by-user=t>
> <
> http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642035.html?by-user=t<http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642035.html?by-user=t&by-user=t>>
>
> >
> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
> >
> > ------------------------------
> > View message @
> >
> http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642044.html<http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642044.html?by-user=t>
> > 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=<http://camel.465427.n5.nabble.com/template/NodeServlet.jtp?tpl=unsubscribe_by_code&node=2642007&code=amF2YTJ1c3VmQGdtYWlsLmNvbXwyNjQyMDA3fC0xNzA3NjkxNDA=&by-user=t>>.
>
> >
> >
> >
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642104.html<http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642104.html?by-user=t>
>
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
> ------------------------------
> View message @
> http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642131.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-tp2642007p2643738.html
Sent from the Camel - Users mailing list archive at Nabble.com.
AW: Request -Reply using JMS
Posted by Schneider Christian <Ch...@enbw.com>.
You can simply execute the following with maven like described in the readme:
mvn exec:java -PCamelServer
Inside the pom file you can see how it works. There is a generic start class org.apache.camel.spring.Main in the distribution that simply starts up a spring context with a given config. Alternatively you can of course write your own class with a main method that starts the spring context.
I often deploy into tomcat as a war archive. You can look at the wsdl first example from cxf if you are interested in this. The method that is shown there can also be used for camel apps.
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 14:49
An: users@camel.apache.org
Betreff: Re: Request -Reply using JMS
i have gone throw the example. You are right.. Examples are similar of what
I am expecting. I have executed the client version and not sure how to
deploy the server version of this example.
I am using JBOSS 4.2 as my appserver, can you please throw me some lights on
this.
Regards,
Yousuff
My Tech Blog: http://passion4java.blogspot.com
On Fri, Aug 20, 2010 at 5:19 PM, Schneider Christian [via Camel] <
ml-node+2642044-1286332494-102506@n5.nabble.com<ml...@n5.nabble.com>
> wrote:
> 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:[hidden email]<http://user/SendEmail.jtp?type=node&node=2642044&i=0>]
>
> Gesendet: Freitag, 20. August 2010 13:45
> An: [hidden email] <http://user/SendEmail.jtp?type=node&node=2642044&i=1>
> 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<http://passion4java.blogspot.com?by-user=t>
>
>
> On Fri, Aug 20, 2010 at 4:51 PM, Schneider Christian [via Camel] <
> [hidden email] <http://user/SendEmail.jtp?type=node&node=2642044&i=2><[hidden
> email] <http://user/SendEmail.jtp?type=node&node=2642044&i=3>>
> > 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>
> <
> http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642007.html?by-user=t<http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642007.html?by-user=t&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> <
> http://interlated.com.au?by-user=t<http://interlated.com.au?by-user=t&by-user=t>>
>
> > 0434 996 607
> > Websites with Intelligence
> >
> >
> > ------------------------------
> > View message @
> >
> http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642022.html<http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642022.html?by-user=t>
> > 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=<http://camel.465427.n5.nabble.com/template/NodeServlet.jtp?tpl=unsubscribe_by_code&node=2642007&code=amF2YTJ1c3VmQGdtYWlsLmNvbXwyNjQyMDA3fC0xNzA3NjkxNDA=&by-user=t>>.
>
> >
> >
> >
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642035.html<http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642035.html?by-user=t>
>
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
> ------------------------------
> View message @
> http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642044.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-tp2642007p2642104.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Request -Reply using JMS
Posted by Mohammed Yousuff <ja...@gmail.com>.
i have gone throw the example. You are right.. Examples are similar of what
I am expecting. I have executed the client version and not sure how to
deploy the server version of this example.
I am using JBOSS 4.2 as my appserver, can you please throw me some lights on
this.
Regards,
Yousuff
My Tech Blog: http://passion4java.blogspot.com
On Fri, Aug 20, 2010 at 5:19 PM, Schneider Christian [via Camel] <
ml-node+2642044-1286332494-102506@n5.nabble.com<ml...@n5.nabble.com>
> wrote:
> 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:[hidden email]<http://user/SendEmail.jtp?type=node&node=2642044&i=0>]
>
> Gesendet: Freitag, 20. August 2010 13:45
> An: [hidden email] <http://user/SendEmail.jtp?type=node&node=2642044&i=1>
> 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<http://passion4java.blogspot.com?by-user=t>
>
>
> On Fri, Aug 20, 2010 at 4:51 PM, Schneider Christian [via Camel] <
> [hidden email] <http://user/SendEmail.jtp?type=node&node=2642044&i=2><[hidden
> email] <http://user/SendEmail.jtp?type=node&node=2642044&i=3>>
> > 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>
> <
> http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642007.html?by-user=t<http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642007.html?by-user=t&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> <
> http://interlated.com.au?by-user=t<http://interlated.com.au?by-user=t&by-user=t>>
>
> > 0434 996 607
> > Websites with Intelligence
> >
> >
> > ------------------------------
> > View message @
> >
> http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642022.html<http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642022.html?by-user=t>
> > 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=<http://camel.465427.n5.nabble.com/template/NodeServlet.jtp?tpl=unsubscribe_by_code&node=2642007&code=amF2YTJ1c3VmQGdtYWlsLmNvbXwyNjQyMDA3fC0xNzA3NjkxNDA=&by-user=t>>.
>
> >
> >
> >
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642035.html<http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642035.html?by-user=t>
>
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
> ------------------------------
> View message @
> http://camel.465427.n5.nabble.com/Request-Reply-using-JMS-tp2642007p2642044.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-tp2642007p2642104.html
Sent from the Camel - Users mailing list archive at Nabble.com.
AW: Request -Reply using JMS
Posted by Schneider Christian <Ch...@enbw.com>.
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...@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.
Re: Request -Reply using JMS
Posted by Mohammed Yousuff <ja...@gmail.com>.
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...@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.