commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <robertburrelldon...@blueyonder.co.uk>
Subject Re: [beanutils] WeakHashMap or ReferenceMAP...?
Date Fri, 16 May 2003 15:29:01 GMT
just to let everyone know, i've committed the WeakHashMap version. the 
reason for this is that commons-logging has a memory which can be solved 
by using WeakHashMap or ReferenceMap but a dependency on 
commons-collections would be unacceptable for commons-logging. the 
commons-logging memory leak prevents old classloaders from being garbage 
collected and this results in the beanutils instances index by the 
classloader no being released either.

i'll (probably) be patching the commons-logging pretty soon to block the 
memory leak (at least for 1.4 JVMs).

- robert

On Wednesday, May 14, 2003, at 11:08 PM, Martin van den Bemt wrote:

> But it is reality and closing your eyes for that, will give more
> problems than solving it I think.. Maybe pressing collections to release
> or temporarily move the class to beanutils is a solution for now, untill
> they have a release (maybe deprecating the class right away is a good
> idea?)
>
> Mvgr,
> Martin
>
> On Wed, 2003-05-14 at 20:25, David Graham wrote:
>> IMHO, using the standard Java classes is better than using custom 
>> classes.
>> I don't think fixing or supporting broken JVMs is Jakarta's 
>> responsibility.
>>
>> David
>>
>>
>>> this is about the replacement of BeanUtils singletons with instances per
>>> thread context classloader (this will ensure that different web apps 
>>> access
>>> different instances). we need to make sure that when the classloader 
>>> (used
>>> as the key) is garbage collected, the instance (which is the value) is 
>>> made
>>> available for garbage collection.
>>>
>>> i've test WeakHashMap on two 1.3 JVMs (macOSX and blackdown linux) and 
>>> in
>>> both cases, the entry value is not correctly removed resulting in a 
>>> memory
>>> leak. WeakHashMap works the way that we need on the 1.4 linux JVM i use
>>> (the sun one, i think).
>>>
>>> the latest ReferenceMap from commons-collections works the way that we 
>>> need
>>> it on all JVMs but this means switching the dependency to the latest
>>> (unreleased) commons-collections.
>>>
>>> so it's  choice between using WeakHashMap in the knowledge that it will
>>> cause a memory leak on some(?) 1.3 JVMs or using ReferenceMap and 
>>> depending
>>> on commons-collections CVS HEAD. comments anyone?
>>>
>>> - robert
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>>>
>>
>> _________________________________________________________________
>> MSN 8 with e-mail virus protection service: 2 months FREE*
>> http://join.msn.com/?page=features/virus
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message