You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Skriloff, Nicholas" <Sk...@darden.virginia.edu> on 2005/03/24 15:47:06 UTC

Tapestry Service Question

I am trying to get a handle on threading in user created tapestry
services in the application file that begin with <service
name="ResumeService" class="ResumeService"/>

 In Tapestry it is my understanding that, "A page must only be used by a
single thread." (page 300 of Tapestry in Action). Thus, the use of page
pooling.  

Suppose we have a component made up of ResumeLink.jwc and
ResumeLink.java.  ResumeLink.java extends AbstractLinkComponent.  In
ResumeLink.java, it calls a tapestry service we designed called
ResumeService.java (to return a resume back to the user) which extends
Abstract Service.    In ResumeService.java we call the method

    public void service(IEngineServiceView engineServiceView,
IRequestCycle cycle, ResponseOutputStream outputStream) throws
ServletException,

What happens when two people request a Resume at the same time?  Is our
class ResumeService and  AbstractService also single threaded?  

Nick 

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


Re: Tapestry Service Question

Posted by Howard Lewis Ship <hl...@gmail.com>.
The engine services are closely related to traditional servlets.  They
should not have any internal state that can't be shared between
threads.  So there's a many-to-one relationship beteween components
and the service, and that's fine. Everything client/thread specific is
encapsulated inside the parameters to the service() method.


On Thu, 24 Mar 2005 09:47:06 -0500, Skriloff, Nicholas
<Sk...@darden.virginia.edu> wrote:
> I am trying to get a handle on threading in user created tapestry
> services in the application file that begin with <service
> name="ResumeService" class="ResumeService"/>
> 
>  In Tapestry it is my understanding that, "A page must only be used by a
> single thread." (page 300 of Tapestry in Action). Thus, the use of page
> pooling.
> 
> Suppose we have a component made up of ResumeLink.jwc and
> ResumeLink.java.  ResumeLink.java extends AbstractLinkComponent.  In
> ResumeLink.java, it calls a tapestry service we designed called
> ResumeService.java (to return a resume back to the user) which extends
> Abstract Service.    In ResumeService.java we call the method
> 
>     public void service(IEngineServiceView engineServiceView,
> IRequestCycle cycle, ResponseOutputStream outputStream) throws
> ServletException,
> 
> What happens when two people request a Resume at the same time?  Is our
> class ResumeService and  AbstractService also single threaded?
> 
> Nick
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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