tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From QM <>
Subject Re: How to run servlet for every 30 minutes in Tomcat 4.1.30
Date Wed, 22 Dec 2004 03:33:17 GMT
On Tue, Dec 21, 2004 at 03:37:26PM -0700, Dennis Payne wrote:
: It is possible to create a servlet thread in the init() method.  That
: thread sould stay alive and run something every thirty minutes.

Yes and no. ;)
It's possible to use a servlet's init() method for this; but per the
spec, containers are free to initialize a servlet class as many times as
they see fit.

Much safer to use a ContextListener in this case, as those are triggered
only on app (context) startup and shutdown.



software  --
tech news --

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message