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.

Reply via email to