Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 37080 invoked from network); 21 Dec 2004 21:42:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 21 Dec 2004 21:42:34 -0000 Received: (qmail 50386 invoked by uid 500); 21 Dec 2004 21:42:00 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 50313 invoked by uid 500); 21 Dec 2004 21:41:59 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 50233 invoked by uid 99); 21 Dec 2004 21:41:58 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of jukka.uusisalo@dnainternet.net designates 62.240.72.111 as permitted sender) Received: from smtp2.dnainternet.net (HELO smtp2.dnainternet.net) (62.240.72.111) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 21 Dec 2004 13:41:54 -0800 Received: from dna237-60.satp.customers.dnainternet.fi ([213.186.237.60]:1504 "EHLO [127.0.0.1]" TLS-CIPHER: ) by smtp2.dnainternet.net with ESMTP id S1228786AbULUVlv (ORCPT ); Tue, 21 Dec 2004 23:41:51 +0200 Message-ID: <41C8995B.3060409@dnainternet.net> Date: Tue, 21 Dec 2004 23:44:59 +0200 From: Jukka Uusisalo User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tomcat Users List Subject: Re: How to run servlet for every 30 minutes in Tomcat 4.1.30 References: <5684A7E6FB10504393A2806C1F4C021005AF8108@orion.qas.com> <41C8643F.5030605@sidsa.es> In-Reply-To: <41C8643F.5030605@sidsa.es> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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. > bernhard.slominski@zooplus.com 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: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org