camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Problem with the timer of camel 2.0-M3??????
Date Wed, 09 Sep 2009 15:25:58 GMT
Hi

That is weird as it just works normally. You can try 2.0 but maybe
doing some debugging etc to see what could be the issue.
Or try some other combinations on the timer configuration. Or compare
with some unit tests using the timer.


On Wed, Sep 9, 2009 at 2:17 PM, FBI35<erwan35@hotmail.com> wrote:
>
> Good morning,
>
> i ve got a problem with the timer of camel 2.0-M3.
> It doesn't run ...The java code and the route seem to be ok...(see code ko)
> if i configure a route with quartz and an cron expression,it works.....(see
> code ok)
>
> Does someone have an idea?
>
>
> CODE KO
>
> RouteBuilder builder = new RouteBuilder() {
> public void configure() {
> from("timer://foo?fixedRate=true&period=3000").process(new Processor() {
>                                        public void process(Exchange
e) {
>                                                logger.info("Test
1 ");
>                                        }
>                                });
>                        };};
> CamelContext myCamelContext = new DefaultCamelContext();
>                        try {
>                                myCamelContext.addRoutes(builder);
>                                myCamelContext.start();
>
>                        } catch (Exception e) {
>                                e.printStackTrace();
>                                myCamelContext=null;
>                                builder=null;
>                        }
>                        finally{
>
>                        }
> CODE OK
>
> RouteBuilder builder = new RouteBuilder() {
> public void configure() {
>
>
> from("quartz://start/TimerTaskForArchivingRecapList/?cron=0+*/2+*+*+*+?")
>                                        .process(new Processor() {
>                                        public void process(Exchange
e) {
>                                                logger.info("Test
2");
>                                        }
>                                });
>                        };};
>                        CamelContext myCamelContext = new DefaultCamelContext();
>                        try {
>                                myCamelContext.addRoutes(builder);
>                                myCamelContext.start();
>
>                        } catch (Exception e) {
>                                e.printStackTrace();
>                                myCamelContext=null;
>                                builder=null;
>                        }
>                        finally{
>
>                        }
> --
> View this message in context: http://www.nabble.com/Problem-with-the-timer-of-camel-2.0-M3-------tp25363752p25363752.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message