My standalone camel app stops routing when I simulate daylight saving time
change by setting the system time back an hour (e.g. date --set "2013-10-16
00:00:30"). Once the system time catches up again to where the time was when
it was set back an hour, the routes all start going again. 

I'm using camel version 2.12 and a camel.main.Main instance to run:  

        public void startDriver() throws Exception
        {
                main = new Main();
                main.enableHangupSupport();     //so you can press ctrl-c to 
terminate the jvm
                
                //TODO put the config in utilityBean
                UtilityBean utilityBean = new UtilityBean();
                
                // The route has the bean instance.
                main.addRouteBuilder(new Routes(utilityBean));

                // run until you terminate the JVM with <ctrl> c
        log.info("Starting Camel. Use ctrl + c to terminate the JVM.\n");
        main.run();
        
        if(main.isStopping())
        {
            log.info("Camel is stopping for timeMonitor. ");
        }
        }
        
        public static void main(String[] args) throws Exception
        {
                Driver driver = new Driver();
                driver.startDriver();
        }

with a timer route set to repeatCount=1 to start up the initial route.

            from("timer://startPollingLoop?repeatCount=1")
            .to("seda:pollingLoop?waitForTaskToComplete=Never");

            from("seda:pollingLoop")
            .to("http://localhost:2013/getTime";)
                .bean(utilityBean, "setTime1")                          
                .delay(60)                      // millis delay between polling 
the timecode, otherwise two
consecutive polls are equal
                .to("http://localhost:2013/getTime";)
                .bean(utilityBean, "setTime2")
                .bean(utilityBean, "compareTimecodes");

        @RoutingSlip
        public String compareTimecodes(Exchange exchange)
        {
                String result = "seda:pollingLoop";

                String name = "compareTimecodes";
                log.debug(name + " time1: "+ getTime1() + " time2: " + 
getTime2() + "\n");
                
                if ((null != getTime1()) && (null != getTime2()) &&
getTime1().contentEquals(getTime2()))
                {
                result = "direct:restartTimeserver";
                }

                // set the message body to empty string
                exchange.getOut().setBody("");
                
                return result;
        }

If I start the initial route without a timer would that possibly resolve
this? And if so, how do I do that? Clearly, I need the routes to run during
that "extra" hour.

Any help is much appreciated.





--
View this message in context: 
http://camel.465427.n5.nabble.com/standalone-camel-stops-routing-for-hour-at-daylight-saving-change-tp5741690.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to