You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Kent Tong <ke...@cpttm.org.mo> on 2005/08/31 17:44:45 UTC

Could a request handling thread be reused?

Hi,

A colleague brought up an interesting issue: Could a request handling
thread be reused for different requests? I've checked the servlet
specification and can't find anything prohibiting this. So, in 
principle, this should be possible. In that case, the extensive use
of thread-modeled hivemind services in Tapestry 4 may break in some
containers?

--
Author of an e-Book for learning Tapestry (http://www.agileskills2.org/EWDT)


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


Re: Could a request handling thread be reused?

Posted by Kent Tong <ke...@cpttm.org.mo>.
Patrick Casey <patcasey <at> adelphia.net> writes:

> 	Maybe I'm answering the wrong question here, but aren't request
> handling threads re-used by default in most servlet containers? On something
> like Tomcat you've got a fixed pool of worker threads, and every request has
> to be served by one of this (relatively static) members of the thread pool.
> So by the time you've handled a few thousand requests, each thread has been
> re-used dozens and possibly hundreds of times.
> 
> 	Or are you talking about a different kind of thread here?

You're right. And I also figured out what's happening. The thread-modeled
services will reset themselves when the thread should be cleaned up, 
not when the thread ends.

--
Author of an e-Book for learning Tapestry (http://www.agileskills2.org/EWDT)


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


RE: Could a request handling thread be reused?

Posted by Patrick Casey <pa...@adelphia.net>.
	Maybe I'm answering the wrong question here, but aren't request
handling threads re-used by default in most servlet containers? On something
like Tomcat you've got a fixed pool of worker threads, and every request has
to be served by one of this (relatively static) members of the thread pool.
So by the time you've handled a few thousand requests, each thread has been
re-used dozens and possibly hundreds of times.

	Or are you talking about a different kind of thread here?

	--- Pat

> -----Original Message-----
> From: news [mailto:news@sea.gmane.org] On Behalf Of Kent Tong
> Sent: Wednesday, August 31, 2005 8:45 AM
> To: tapestry-user@jakarta.apache.org
> Subject: Could a request handling thread be reused?
> 
> Hi,
> 
> A colleague brought up an interesting issue: Could a request handling
> thread be reused for different requests? I've checked the servlet
> specification and can't find anything prohibiting this. So, in
> principle, this should be possible. In that case, the extensive use
> of thread-modeled hivemind services in Tapestry 4 may break in some
> containers?
> 
> --
> Author of an e-Book for learning Tapestry
> (http://www.agileskills2.org/EWDT)
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org




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