Hi All,
I have a J2EE application that needs a special component. This component is not to be referenced by any other component or a client. All it does is wake up every few seconds, does some processing, and then gos to sleep. What would be the ideal way to implement this component: As a servlet? As a MDB? Or as something else?
Regards,
Amit
-
Background Thread in J2EE (2 messages)
- Posted by: Amit Batra
- Posted on: December 22 2003 07:24 EST
Threaded Messages (2)
- Background Thread in J2EE by Keerthi P on December 22 2003 07:43 EST
- Background Thread in J2EE by Paul Strack on December 22 2003 09:48 EST
-
Background Thread in J2EE[ Go to top ]
- Posted by: Keerthi P
- Posted on: December 22 2003 07:43 EST
- in response to Amit Batra
Try Quartz. http://www.quartzscheduler.org. -
Background Thread in J2EE[ Go to top ]
- Posted by: Paul Strack
- Posted on: December 22 2003 09:48 EST
- in response to Amit Batra
I would suggest you write the component as a Thread, and start the thread in the init() method of a servlet. Then, in your web.xml configuration file, specify that your servlet will load on startup.