Carsten Ziegeler wrote:
> Hi,
> 
> sorry for this question - but I'm currently totally confused
> if the avalon concepts (4.x) always work as expected. (I hope they do...)
> 
> Example: I have two components, one being ThreadSafe and one Poolable
> component which is of course not ThreadSafe.
> 
> Now, the ThreadSafe component looks up the Poolable one, lets say
> in the compose() method and stores this instance for the whole
> lifetime.
> 
> Does this work properly? I would assume that now the Poolable
> component is used as a ThreadSafe one. Is this right?
> Or do I oversee something?

That component is now being referenced by the ThreadSafe one for the
duration.  It is not really a good thing.  If there is the slightest
chance that a component might be transient (poolable or singlethreaded)
then you have to grab a new instance each time you need to use it.

-- 

"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to