tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phil campaigne <>
Subject Re: How to run servlet for every 30 minutes in Tomcat 4.1.30
Date Tue, 28 Dec 2004 01:23:55 GMT
Jukka Uusisalo wrote:

> Jorge Sopena wrote:
>> Why is bad using own threads inside web application?
>> Aren't all the servlet request actually a thread in Tomcat?
>> I can't find a reason why it's so bad solution.
> I think that comes from J2EE specs. I do not remember is threads just
> forbidden but if you follow specs, you do not know and you do not have
> to know how application server uses threads and controls thread 
> behaviour. If portability is issue for your application, it is better to
> not use threads.
> >
>> In that way, you manage to have a single and independent application.
>> Maybe I don't know some thread behaviour in Tomcat...
> After all, I have use threads in web application with tomcat :) and I 
> haven't have any problems or strange thread behaviour. Sometimes whole 
> concurrent programming and syncronizing my own threads causes troubles 
> but nothing due tomcat.
> Back to original question.
>> wrote:
>> I am using Tomcat4.1.30 version.
>> I have to develop a client application which looks in the database 
>> every 30
>> minutes,
> ApplicationContextListener + Timer + TimerTask
>> to retrieve the status of an order and send the status to the remote 
>> client.
>> Again waits for the
>> The client's response and insert the repsonse back to the database.
> What is that remote client? Is actually another server and your 
> application is client. If so, just add client code for server in 
> TimerTask (http-, web service- or whatever client).
> - Jukka -
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
I am currrently using threads so I'd like to know if there is a way to 
set priorities so that an os scheduled job that hits my database won't 
take precedence over my application http requests.  How do you control 
the priority when the data access task is a separate appolication?

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

View raw message