You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Patrick Casey <pa...@adelphia.net> on 2005/07/01 22:17:16 UTC

Engine Service Question

 

            How does the tapestry engine manage engine services?
Specifically, are they pooled, instantiated on a per request basis? One
static service that all requests use?

 

            Basically if I have two threads that each do:

 

            IEngineService service =
cycle.getEngine().getSerice(SERVICE_NAME);

 

            Are they each getting a guaranteed unique instance of the
service object?  Is the engine instantiating a fresh service object every
time I make this call? Plucking them out of a pool? Using only one service
object for all requests (in which case I'll have to synchronize some stuff)?

 

            --- Pat


RE: Engine Service Question

Posted by Patrick Casey <pa...@adelphia.net>.
	Thanks Kent, that's what I needed to know.

	--- Pat

> -----Original Message-----
> From: news [mailto:news@sea.gmane.org] On Behalf Of Kent Tong
> Sent: Saturday, July 02, 2005 6:46 PM
> To: tapestry-user@jakarta.apache.org
> Subject: Re: Engine Service Question
> 
> Patrick Casey <patcasey <at> adelphia.net> writes:
> 
> >
> >             How does the tapestry engine manage engine services?
> > Specifically, are they pooled, instantiated on a per request basis? One
> > static service that all requests use?
> 
> One for all requests.
> 
> >             Basically if I have two threads that each do:
> >
> >             IEngineService service =
> > cycle.getEngine().getSerice(SERVICE_NAME);
> >
> >             Are they each getting a guaranteed unique instance of the
> > service object?  Is the engine instantiating a fresh service object
> every
> > time I make this call? Plucking them out of a pool? Using only one
> service
> > object for all requests (in which case I'll have to synchronize some
> stuff)?
> 
> Again, one for all requests. You have to synchronize the accesses
> yourself.
> 
> --
> 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


Re: Engine Service Question

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

> 
>             How does the tapestry engine manage engine services?
> Specifically, are they pooled, instantiated on a per request basis? One
> static service that all requests use?

One for all requests.

>             Basically if I have two threads that each do:
> 
>             IEngineService service =
> cycle.getEngine().getSerice(SERVICE_NAME);
> 
>             Are they each getting a guaranteed unique instance of the
> service object?  Is the engine instantiating a fresh service object every
> time I make this call? Plucking them out of a pool? Using only one service
> object for all requests (in which case I'll have to synchronize some stuff)?

Again, one for all requests. You have to synchronize the accesses yourself.

--
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