On Fri, Dec 10, 2010 at 7:16 AM, mak <makk...@gmail.com> wrote:
>
> Hi, I have the following route defined -
>
>
>
> from("timer://foo?period=5000").setBody(constant("select top 500 *  from
> MyTable where processed = 0"))
>                .to("jdbc:dataSource").split(body()).parallelProcessing()
>                .process(new MyProcessor()).unmarshal(jaxb)....
>
>
> In this configuration, I am polling the database every 5 seconds and
> fetching the first 500 records with each poll.
> What I really want to do is work on ALL the records in this table, 500 at a
> time ONLY ONCE. So I do not want the timer component in there.
> Can someone guide me with such a route definition?
> --

What do you want?

If you dont want to a route to trigger every 5th second then dont use a timer.

You can just call a bean when you app start and have that bean get the
data from the database using a loop and get data 500 rows at a time.




> View this message in context: 
> http://camel.465427.n5.nabble.com/Fetching-from-the-JDBC-component-only-once-tp3299863p3299863.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to