You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Steve Kirk <to...@web-startup.co.uk> on 2005/06/01 15:41:57 UTC

RE: invoking Thread.Sleep() from a servlet instance

I have used Thread.sleep() in a webapp, but not within a servlet as such.  I
wrote Runnable classes that were started in their own thread of execution
when the webapp started up.  This worked fine.

> -----Original Message-----
> From: Tim Funk [mailto:funkman@joedog.org] 
> Sent: Tuesday 31 May 2005 18:50
> To: Tomcat Users List
> Subject: Re: invoking Thread.Sleep() from a servlet instance
> 
> 
> It's allowed and typically a bad idea.
> 
> 
> -Tim
> 
> Clark O'Brien wrote:
> 
> > I am looking for insight on invoking Thread.sleep()
> > from a Tomcat Servlet. I understand it is explicitly
> > prohibited in the J2EE spec and it is not hard to 
> > comprehend that invoking sleep on a thread that is
> > processing multiple requests could cause serious side
> > effects. Still I hear rumors that Tomcat allows sleep
> > invocations and I occasionally see it done.
> >                    clark
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org