Re: ProducerTemplate and direct:start in camel

2013-04-08 Thread Chris Geer
On Mon, Apr 8, 2013 at 9:30 PM, Tarun Kumar wrote: > "Ok, first thing is you need to start your context (which starts the > routes) > before you can use a producer template to send a message to it. Starting > the context is what creates and publishes the endpoints so that they can > receive messag

Re: ProducerTemplate and direct:start in camel

2013-04-08 Thread Maruan Sahyoun
Hi Tarun, from you description > I have written one JAX-RS service which when invoked creates CamelContext, > adds this route to CamelContext, Create ProducerTemplate, calls > pt.sendBody() method and then starts CamelContext. you start the CamelContext AFTER you use the ProducerTemplate but yo

Re: ProducerTemplate and direct:start in camel

2013-04-08 Thread Tarun Kumar
"Ok, first thing is you need to start your context (which starts the routes) before you can use a producer template to send a message to it. Starting the context is what creates and publishes the endpoints so that they can receive messages. If the context isn't started there is no "direct:start" en

Re: ProducerTemplate and direct:start in camel

2013-04-08 Thread Chris Geer
On Mon, Apr 8, 2013 at 7:56 PM, Tarun Kumar wrote: > Here's what i am doing: > > I have written one JAX-RS service which when invoked creates CamelContext, > adds this route to CamelContext, Create ProducerTemplate, calls > pt.sendBody() method and then starts CamelContext. > Ok, first thing is y

Re: ProducerTemplate and direct:start in camel

2013-04-08 Thread Tarun Kumar
Here's what i am doing: I have written one JAX-RS service which when invoked creates CamelContext, adds this route to CamelContext, Create ProducerTemplate, calls pt.sendBody() method and then starts CamelContext. Tarun On Tue, Apr 9, 2013 at 8:19 AM, Chris Geer wrote: > On Mon, Apr 8, 2013 a

Re: ProducerTemplate and direct:start in camel

2013-04-08 Thread Chris Geer
On Mon, Apr 8, 2013 at 7:45 PM, Tarun Kumar wrote: > My camel route is : > > from("direct:start") > .to("http://myhost/mypath";); > > I used : > > ProducerTemplate template; > template.sendBody("direct:start", "This is a test message"); > > to send the exchange. I am getting following exception: >

ProducerTemplate and direct:start in camel

2013-04-08 Thread Tarun Kumar
My camel route is : from("direct:start") .to("http://myhost/mypath";); I used : ProducerTemplate template; template.sendBody("direct:start", "This is a test message"); to send the exchange. I am getting following exception: No consumers available on endpoint: Endpoint[direct://start]. How can