tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ALEXANDROS KOTSIRAS" <ALEXANDRO...@prodigy.net>
Subject Re: API question: Class instantiation with Tomcat
Date Sat, 19 Aug 2000 09:28:55 GMT
Yes this is possible,
Have a look at www.coolservlets.com , they havea utility package called
ServletMaintenance.
The idea is that you instantiate in the init() method of a servlet that
class which runs as a thread scheduled to perform
some task every x days/hours/minutes.
The  ServletMaintenance class gives you all the scheduling functionality ,
you only need to overide the method that will be executed and also specify
how often you want it to execute (days/hours/minutes).

Alex.

----- Original Message -----
From: Luis Andrei Cobo <valis@megapathdsl.net>
To: <tomcat-user@jakarta.apache.org>
Sent: Friday, August 18, 2000 10:54 PM
Subject: API question: Class instantiation with Tomcat


> Is it possible to tell a servlet to execute another class on the server to
> run independantly from the servlet, for example:
>
> jsp calls a servlet and passes in a request object.
>
> the servlet processes the request, and returns information to the client,
> but also initializes a class on the server to run outside of the client
> server interaction, perhaps performing some routine database clean up or
> something similar, which shouldnt interrupt the flow of the client-server
> process.
>
> How is this done?
>
> Luis
>


Mime
View raw message