Hi You use Camel 2.9.0 or better? http://camel.apache.org/routepolicy
Those methods was introduced in that release. On Tue, Mar 20, 2012 at 11:27 AM, OrackBahama <jdorfsch...@metadok.de> wrote: > Hi, > I'm using CronScheduledPolicy to start and stop a route at certain times > with the intention of having kind of a batch job. It really works fine - > however I found an "unsymmetry" in the behavior of this class. > > To close and rollover a logfile at the end of such a batch job (logback > triggering policy) and use it as a report for the job, I derived a class > named CronScheduledLoggingPolicy from CronScheduledPolicy and overrode the > constructor and the startRoute and stopRoute methods in the same way: > > @Override > protected void startRoute( Route route ) throws Exception > { > super.startRoute( route ); > log.debug( "started: {}", route.getId()); > } > > In case of starting everything works as expected - but in case of stopping a > route it appears that (my overridden) "stopRoute" method is never called > (neither the "onStop" method nor "doStop") .... > > What am I doing or understanding wrong ? > > Thanks for any help in advance ! > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/CronScheduledRoutePolicy-tp4552324p5579613.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/