Robert Leftwich wrote:

> At 03:48 AM 8/09/2002, Stephen McConnell wrote:
>
>> What I actually mean was - which "component container" are you using 
>> and the answer is the ECM (Excalibur Componnet Manager varient on 
>> which Cocoon is based).
>
>
> Excuse my newbie misunderstanding :-)


Hey - I'm only just starting to look inside Cocoon - we are both newbies!

>
>> Which means that the lifestyle declaration is the issue you need to 
>> deal with (thread-safe, per-thread, etc.).
>
>
> Yep, what threw me was that there is no mention of thread-based 
> lifecycle interactions in the Avalon page on the component lifecycles, 
> so I made a (bad) assumption. 


The Avalon framework content is almost exclusively a client view of a 
component.  In the past there were a number of marker interfaces that 
were used to signal a lifestyle towards the container managing the 
component. More recently the focus is shifting towards the formal 
declaration of component characteristics through metadata.  This is the 
approach used by both the Merlin and Phoenix containers, and the 
approach favoured from Fortress development (Merlin, Fortress and 
Phoenix different Avalon component containers). You are more likely to 
find information about lifestyle support under the container documentation.

For example:

Fortress
http://jakarta.apache.org/avalon/excalibur/fortress/

Merlin
http://jakarta.apache.org/avalon/excalibur/merlin/


>
>
>> My guess is that you have a configuration which is declaring a 
>> lifestyle policy of a new instance per request and you actually want 
>> something like per-thread of a singleton policy.
>
>
> Spot on - ThreadSafe appears to do it for me, is that the correct 
> declaration for singleton behavior? 


I tend to break things down into the following:

    singleton  :  a single instance shared across mutliple threads

    per-thread :  a instance per thread of execution

    pooled     :  a pool of instances that are recycled back to
                  pool by the client

    transient  :  a new instance per request

At least that the model implementated within the Merlin container.

Cheers, Steve.



>
>
> Robert
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>

-- 

Stephen J. McConnell

OSM SARL
digital products for a global economy
mailto:[EMAIL PROTECTED]
http://www.osm.net




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to