I tried variants of Multiphase Cancellation with an applet - it
generated 
a lot of bytecodes but I think it caught everything. As a last resort,
I always thought Thread.stop() combined with catching ThreadDeath's
was a reasonable way to keep a browser running that otherwise might 
lock-up. Although I'm not really sure what impact Thread.stop() could
have in a servlet engine.

I don't think that a servlet container is any longer-lived than a server
or, in some cases, a browser. Applets have a bigger problem because you
have
absolutely no idea what environment they will end up in- IE4 or NS6 with

1.3.xxx. 

With proper programming and a bug-free environment, starting and
stopping
threads shouldn't be a big deal. The issue is normally graceful handling
of Exception-al conditions.

Thanks.


->-----Original Message-----
->From: Christopher K. St. John [mailto:[EMAIL PROTECTED]]
->Sent: Monday, August 06, 2001 1:17 PM
->To: [EMAIL PROTECTED]
->Subject: Re: is there support for raw tcp sockets ?
->
->
->Mike Marchywka wrote:
->>
->> In the DayTime Server example I have, there appears to be a call
->> to Thread.stop() ( on page 301 in Hunter/Crawford)to stop the
->> daemon thread. Is this accepted procedure or is there a more recent
->> edition?
->>
->
-> Thread.stop() has been deprecated for a while now,
->refer to the java.lang.Thread.stop() javadocs for
->further details. Thread.interrupt() requires that
->the interrupted thread be specially written to notice
->the interrupt. Check the references in my previous
->posts in this thread, especially the 'Cancellation'
->article by Doug Lea, and the reference to the 1.4
->javadocs.
->
-> Java does not provide a generic way to stop a Thread,
->the argument being that any possible cure is worse
->than the disease.
->
->
->> It doesn't look like there is really anything more dangerous about
->> launching a thread from a servlet than from anything else
->>
->
-> The main difference is that (presumably) a servlet is
->running inside a long-running servlet-container. So if
->your servlet is eating threads, eventually it's going
->to eat them all. Then, depending on how well your servlet
->container is written, the whole container or maybe just
->your servlet will stop working. In some circles, that
->sort of thing is considered embarrassing.
->
-> If you've read the Doug Lea article, and your response
->was to nod your head and mumble 'well, of course, that's
->all obvious', then never mind, you understand the issues
->well enough to make the safety-vs-convenience judgement on
->your own. If you read the article and thought to yourself
->'This guy is crazy, it can't really be all that hard', then
->you need to re-read the article.
->
->
->--
->Christopher St. John [EMAIL PROTECTED]
->DistribuTopia http://www.distributopia.com
->
->______________________________________________________________
->_____________
->To unsubscribe, send email to [EMAIL PROTECTED] and 
->include in the body
->of the message "signoff SERVLET-INTEREST".
->
->Archives: http://archives.java.sun.com/archives/servlet-interest.html
->Resources: 
->http://java.sun.com/products/servlet/external-resources.html
->LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
->
->

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to