Hi,
Forget Thread.destroy(). According to docs, destroy() does just that -
destroys. Without any cleanup, for example if destroyed thread locked some
objects using synchronized, those objects can _never_ be locked by
synchronization again, needless to say, it's a sure deadlock. Try
Thread.stop(). It, as the name implies, stops ;> The difference is, stop()
is implemented, and while it's not recommended (deprecated) it's working and
it's relatively safe.

Greetings,
     deacon Marcus

-----Original Message-----
From: Renato Weiner [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 03, 2001 3:41 PM
To: [EMAIL PROTECTED]
Subject: Timing-out servlet execution


Hi all,
I'm using Tomcat 3.2.2 in Linux, JDK 1.3.1, shared environment. Everything
is pretty fine, except for the fact that sometimes one of the users write an
endless loop. I looking for a way to 'time-out' servlet execution. I could
change ServelWrapper class, but according some advise I received, it's very
hard to terminate a Thread, since in Java 2, the method Thread.destroy() is
not implement.
Does anybody have a patch that 'times-out' servlet execution ? Any hints to
write a patch ?
Thanks
Renato.




Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 a year!
http://personal.mail.yahoo.com/

Reply via email to