tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From QM <qm...@brandxdev.net>
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.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message