>>> 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: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to