On Fri, Jun 25, 2010 at 8:32 AM, Jim Talbut <jtal...@spudsoft.co.uk> wrote: > On 25/06/2010 06:17, Claus Ibsen wrote: >> >> I think the reason is the scheduler is started before the other routes >> has been fully started. And quartz starts very quick. >> >> We could add an option so you can configure a delay option so it can >> be started with delay. >> It has a startDelayed method: >> http://www.quartz-scheduler.org/docs/api/1.8.1/org/quartz/Scheduler.html >> >> >> However a better solution is to offer this as a feature in Camel which >> allows component to register callbacks to be invoked when all the >> other stuff have been started, so they can start last. >> >> >> I have created a ticket to track that >> https://issues.apache.org/activemq/browse/CAMEL-2855 >> >
Hi Jim > In my experience* one always needs to use the delay start features of quartz > because it always gets going before its dependents. > Even if you have a "start last" feature, unless you make it a complex tree > of dependencies you are going to face the situation where quartz (a late > starter) is dependent on another late starter and you still have the race > condition. > Also a start-last feature doesn't work when the thing which quartz depends > upon is outside of camel. > > So a start-last feature may be a good idea, but I think camel should > probably make the delay start features of quartz available too. > Thanks for the input. The quartz component will now start late by default when all the routes etc. has been started. And there is also a new startDelayedSeconds option on quartz component you can use to let quartz start the scheduler after X seconds. > Jim > > * Which is restricted to using clustered quartz (and hence a persistent > store for jobs) outside of camel. > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus