cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gianugo Rabellino <gian...@apache.org>
Subject Re: VERY odd exceptions...
Date Tue, 25 May 2004 11:42:36 GMT

On May 25, 2004, at 1:30 PM, Pier Fumagalli wrote:

> On 25 May 2004, at 11:22, Ugo Cei wrote:
>> Pier Fumagalli wrote:
>>>
>>> I seriously think (I can't see it but can definitely smell it) that 
>>> it  happens because one of those handlers (somehow) gets recycled, 
>>> and it's  reused before it's actually fully disposed...
>>> So, I _seriously_ think that by fixing the problem adding the  
>>> appropriate synchronizations, we'll not solve a deeper bug somewhere 
>>> in  the pools...
>>
>> I am more and more inclined to think that pooling is harmful more 
>> than it is useful. Components shouldn't be pooled by default, only on 
>> special occasions and after careful consideration. Apparently, doing 
>> a bug-free pool is harder than it seems.
>
> Oh, well... I totally agree with you on this... Especially since the 
> JVMs got quite a lot faster in the last few years... Pooling JDBC 
> connections is one thing, pooling random objects another.

But, again, you should consider that in quite a few occasions you're 
pooling coonfigured & initialized objects. It's not just creation 
overhead: at times configuration can be a complex beast to manage, 
leading to heavy processing times.

Then again, +1 on not using pools as plain "new" surrogates.

Ciao,
-- 
Gianugo Rabellino
Pro-netics s.r.l. -  http://www.pro-netics.com
Orixo, the XML business alliance: http://www.orixo.com


Mime
View raw message