camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikes300 <mikes...@yahoo.com>
Subject Camel Java routes using Timer firing only once
Date Wed, 23 Jul 2014 03:33:20 GMT
I can get routes kicked off in Java DSL however the timer routes execute once
and only once no matter what.  Here is a sample of what I have, very
easy/simple.  But it just fires once.  Successfully, but just once. 

from("timer://foo?fixedRate=true&period=10000").to("file:target/reports/?fileName=sync.txt");
//	                from("timer://foo?fixedRate=true&period=10s").bean(new
SyncInvoker(), "sayHello()");
//	                from("timer://foo?fixedRate=true&period=10s").bean(new
SyncInvoker(), "sayHello()");

I can get it to work in Spring after it bootstraps its listener context but
then I am stuck in Spring and we have a requirement to get out of Spring. 
Any thoughts out there?  Or examples of a full route config in java that
utilizes a timer as such?

In the end I am using it to manage a polling mechanism against some ActiveMQ
queues, then doing stuff with the messages.  But I am stuck at step one!

Thanks in advance! 



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Java-routes-using-Timer-firing-only-once-tp5754275.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message