cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: [2.2] Proxies for pooled components
Date Mon, 14 Feb 2005 12:52:30 GMT
Carsten Ziegeler wrote:

> I just finished the work on creating proxies for pooled components. 
> Now this is a feature that was missing in Avalon since it's creation.
>
> Why? In theory the client code for components should not need to know 
> if the component it uses are thread safe or pooled. In fact if you're 
> developing a thread safe component, you need to know if the components 
> you're using are thread safe or not. In the first case, you can simply 
> look them up in service(), in the latter you have to lookup the 
> component (and release it) each time you use the component.
>
> So, finally I added the creation of proxies to our core. This is 
> transparent to the client code and from a user POV you don't have to 
> change anything. Now you can simply look up all components in 
> service() and everything should work fine - the code isn't tested that 
> much, but seems to work. Enabling it will hopefully find all open issues.
>
> I guess that one of the first replies to this mail will be someone 
> stepping up and telling that pooled components are bad anyway and we 
> should use a factory approach for pooled components (this would also 
> reduce configuration time) etc. I'm not against doing that, but pooled 
> components are realitity *today* and it's really annoying while 
> implementing own thread safe components to take care of this issues. 
> With proxies these problems go away.


First question, but not the one you expected ;-)

Can you explain what these proxies are for exactly? Is it to avoid 
lookup/release at each usage? If yes, how/when are the components 
actually put back in the pool (sorry, not much time to look at the code 
ATM)?

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


Mime
View raw message