tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wolfgang Stein <zo...@gmd-net.de>
Subject Re: I need to run a servlet periodically
Date Wed, 09 Oct 2002 13:35:16 GMT
Hi Filip,

i think this it is a bad idea, to invoke 
a (Runnable) servlet via start().

In what state will be the servlet context, 
what about the ServletRequest or the log()
method for example ? 
I think the result will depend on server implementation
details, but it is very likely to get IllegalStateExceptions
at least.

As already being said:
a) If you need servlet functionality periodically 
   let a cron job do servlet requests periodically 
b) If you don't need servlet functionality
   just let a cron job do the job

Greetings
Wolfgang Stein



> -----Original Message-----
> From: Cato, Christopher [mailto:ccato@rational.com]
> Sent: Wednesday, October 09, 2002 3:04 PM
> To: 'tomcat-user@jakarta.apache.org'
> Subject: SV: I need to run a servlet periodically
> 
> 
> What you really need to do is to design your periodical 
> servlet to implement
> Runnable. Add another servlet that starts the periodical 
> servlet and load
> that servlet during startup. The periodical then does its 
> thing and sleeps
> for x amount of time. Then wakes up and so on...
> 
> /Christopher
> 
> -----Ursprungligt meddelande-----
> Fran: Raj Saini
> Till: Tomcat Users List
> Skickat: 2002-10-07 23:24
> Amne: Re: I need to run a servlet periodically
> 
> To need the servlet run periodically you need a client calling the 
> servlet periodically. Make your client to run periodically 
> and it will 
> cause the servlet to run.
> 
> We can suggest you a solution if you let us know what exactly 
> you want 
> your servlet to do.
> 
> Raj Saini
> Filip Rachunek wrote:
> > Hello,
> > is it possible to have a servlet in Tomcat container
> > which is invoked automatically each gived time period?
> > [e.g. each 10 minutes]  And I would also need this
> > special servlet to access other resources of my web
> > application [connection pool, ...].
> > 
> > Thanks.
> > Filip Rachunek
> > 
>

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


Mime
View raw message