cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Ziegeler <cziege...@apache.org>
Subject Re: [2.2] ThreadLocal use in PoolableProxyHandler
Date Fri, 03 Jul 2009 08:41:41 GMT
Alexander Daniel wrote:
> Does somebody know why ThreadLocal is used in PoolableProxyHandler [1]
> for the componentHolder in Cocoon 2.2?
> 
Sure :)

Whenever components are taken out of the pool they need to be put back
somehow, so they are available for other clients again.
We use a thread local which is cleared when the request finishes,
so all used components get back into the pool.

Carsten

> Thanks, Alex
> 
> [1]
> http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/PoolableFactoryBean.java
> 
> 


-- 
Carsten Ziegeler
cziegeler@apache.org

Mime
View raw message