Hmm Eelco, im puzling with a guice quartz integration as well. it's here and not at all complete (along with an ehcache integration) : http://code.google.com/p/slurry/
2010/5/28 Eelco Hillenius <[email protected]>: >>>> I had a terrible day because one of my bosses complain about how I have >>>> done >>>> one task of a project, we had to implement "something" that updates a field >>>> in the database, my brilliant idea was to create a thread inside the wicket >>>> init method that makes a query to the database every 3 hours and updates >>>> the >>>> fields. > > I don't think it is horrible, though it sounds a bit like a quick fix. > It doesn't have to do with your web application of course, though > Wicket's application object is a natural place to do bootstrapping. > >>> Struts timers (at least the ones I know of) are for timing how long a >>> webpage takes to render. Perhaps he's confused with TimerTasks, which are >>> in Java, not Struts. > > I think that in general using TimerTask is better than just spawning > of a thread. > >> If you are using some logic to update the database "every N time", >> then I suggest using Quartz: >> https://quartz.dev.java.net/ >> http://www.quartz-scheduler.org/overview/index.html > > And using Quartz is even better. > >> The only tricky part of Quartz has been deploying it properly on an >> application cluster -- to avoid having the same scheduled tasks run >> simultaneously. If you have a "backend" app server you can purpose >> running scheduled tasks on, then it is simple. > > Quartz does the job, and for my work I created a nice Guice > abstraction for it, but I've never been crazy about the API and > implementation (though it's stable and reasonably efficient). I wonder > if anyone has any real life experience with > http://sna-projects.com/azkaban they want to share? > > Eelco > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
