geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clebert Suconic <clebert.suco...@gmail.com>
Subject Re: PR Merge?
Date Tue, 23 Aug 2016 15:42:34 GMT
> Not sure I get you there, commons clearly doesn't take in charge any of that
> but some containers can force some cleanup (not the other way around) - at
> least for beansutils for instance.

With a WeakHashmap, the cache will be removed once the classLoader is
released, right? Which is what I am trying to achieve here. The cache
per classLoader. And Removing the classLoader once the references are
released.


>
> Starting with a "leaking" WeakHashMap<ClassLoader, Provider> and see if
> consumers are complaining.
>
> It would solve your issue and I can make it working in tomee for instance


Why it would matter? a WeakHashMap won't cause a leak in anyways. The
ClassLoader is a weak references. Whenever Tomee released the
classLoader the element would go away from the WeakHashMap. That's how
weakHashMaps work, and that's the intent.

Mime
View raw message