On 29/01/2020 15:55, Daniel Fuchs wrote:
Hi Seán,

http://cr.openjdk.java.net/~coffeys/webrev.8223260.v1/webrev/
A WeakHashKey with the TCCL as the key should be okay here.

If the TCCL is the key then there are good chances that the
concrete factory class is expected to be loaded by the TCCL.

If that happens then the value will reference the key and
nothing will ever get garbage collected.
I don't know how much JNDI is used much beyond LDAP these days but you are right that a factory with a strong ref to the TCCL would prevent it from being GC'ed.  The internal WeakPairMap might be useful here.

-Alan

Reply via email to