I knew it was something easy I was missing. That indeed fixed my problem.
Thanks.


Hiram Chirino wrote:
> 
> It does not look like you called cContext.start();
> The routes are not started until the context is started.
> 
> 
> On Jan 3, 2008 12:07 PM, Stephen J <[EMAIL PROTECTED]> wrote:
>>
>> I've slightly modified the JMS example to the following code, but it
>> doesn't
>> seem to work.
>>
>> CamelContext cContext = new DefaultCamelContext();
>> cContext.addRoutes(new RouteBuilder() {
>> public void configure() {
>>         from("activemq:MCTestQ:test.topic").process(new Processor() {
>>                         public void process(Exchange exch) throws
>> Exception {
>>                                 System.out.println("processing from
>> activemq.");
>>                         }
>>         }).to("file:temp/camel");
>>         from("file:temp/camel").process(new Processor() {
>>                         public void process(Exchange exch) throws
>> Exception {
>>                                 System.out.println("Wrote a message to
>> the archive.");
>>                         }
>>         });
>> }
>> });
>> CamelTemplate template = new CamelTemplate(cContext);
>> template.start();
>>  for (int i = 0; i < 10; i++) {
>>    template.sendBody("activemq:MCTestQ:test.topic", "Test message: " +
>> i);
>>  }
>> Thread.sleep(1000);
>> template.stop();
>> }
>>
>> I can see the messages being sent to the queue in the ActiveMQ admin
>> console, but I never see any of the System.out messages, nor are any
>> files
>> created.
>>
>> I'm still new to the whole camel project, so please tell me what I've
>> missed, and how I can understand it better.
>> Thanks!
>> --
>> View this message in context:
>> http://www.nabble.com/Newbie-RouteBuilder-question-help-tp14601037s22882p14601037.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Regards,
> Hiram
> 
> Blog: http://hiramchirino.com
> 
> Open Source SOA
> http://open.iona.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Newbie-RouteBuilder-question-help-tp14601037s22882p14605775.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to