Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 68070 invoked from network); 8 Sep 2004 10:11:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 8 Sep 2004 10:11:29 -0000 Received: (qmail 18494 invoked by uid 500); 8 Sep 2004 10:10:06 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 18272 invoked by uid 500); 8 Sep 2004 10:09: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 18179 invoked by uid 99); 8 Sep 2004 10:09:58 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [62.67.60.3] (HELO mail01.hh02.uptime.de) (62.67.60.3) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 08 Sep 2004 03:09:55 -0700 Received: (qmail 4292 invoked from network); 8 Sep 2004 10:09:51 -0000 Received: from unknown (HELO server02.hh.uptime.de) (postmaster@uptime-isc.de@212.202.153.225) by services01.hh02.uptime.de with SMTP; 8 Sep 2004 10:09:51 -0000 Content-class: urn:content-classes:message Subject: RE: Tomcat5 and Servlet Timeout: Possible? MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Date: Wed, 8 Sep 2004 12:09:51 +0200 Message-ID: <38A9EC5928D4D8498ECCBF14DF7C54440C0173@server02.hh.uptime.de> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Tomcat5 and Servlet Timeout: Possible? Thread-Index: AcSVD92v5LHRH6ysSGGVkkivtckJpQAe9RaA From: "Ralph Einfeldt" To: "Tomcat Users List" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N You may try following snippet as a base for a filter. (I havn't tried it in a filter chain, so no garantee) InterruptTimer mTimer =3D new InterruptTimer(5000, 10); mTimer.start(); try { doChain() // Don't have the correct syntax at hand... } catch (??InterruptedIOException?? ex) { // Log what you think to be helpfull } mTimer.reset(); public class InterruptTimer extends Thread { long oEndTime =3D 0; int oSleepTime =3D 10; Thread oStartingThread =3D Thread.currentThread(); Thread oRunningThread =3D null; public InterruptTimer(int aLength, int aSleepTime) { // Both times are in ms oSleepTime =3D aSleepTime; oEndTime =3D System.currentTimeMillis() + aLength; } =20 public void run() { oRunningThread =3D Thread.currentThread(); // Loop until the end time is reached or reset() was called. while (System.currentTimeMillis() < oEndTime) { try {=20 Thread.sleep(oSleepTime); } catch (InterruptedIOException ex) { } } if (oEndTime > 0) { timeout(); } } public void reset() { oEndTime =3D 0; } public void timeout() { oStartingThread.interrupt(); } } > -----Original Message----- > From: news [mailto:news@sea.gmane.org]On Behalf Of Andreas Schildbach > Sent: Tuesday, September 07, 2004 9:19 PM > To: tomcat-user@jakarta.apache.org > Subject: Re: Tomcat5 and Servlet Timeout: Possible? >=20 >=20 > Shapira, Yoav wrote: >=20 > > There's no such option in Tomcat. >=20 > So if one thread hangs, it hangs forever. >=20 > If it blocks other threads, the whole app hangs... >=20 > Regards, >=20 > Andreas >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org >=20 >=20 >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org