Is it efficient to run a Timer in application bean in a web project?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Debasis_Roy
Posted On:   Tuesday, December 11, 2007 01:48 AM

I have to run a Timer that runs with a period of 24 hours and do some tasks. I want to add this timer in application bean of my netbeans visual web pack project. Will it cause the sun application server to be overburdened ?

Please, comment on this problem. Thanks in advance.

Re: Is it efficient to run a Timer in application bean in a web project?

Posted By:   Robert_Lybarger  
Posted On:   Tuesday, December 11, 2007 08:56 AM

On the surface of things, its probably doable. (It is basically just a Thread that sleeps around for a while and calls back when finished.) But I'd offer a counter-suggestion to use your operating system's concept of a "scheduled task" (commonly in UNIX parlance, a "cron job"). Rig up a requesst URL that [only] the scheduled task can call to get your periodic job done.
About | Sitemap | Contact