[jboss-dev-forums] [Design the new POJO MicroContainer] - Composite Map key and weak reference

alesj do-not-reply at jboss.com
Tue May 20 08:17:56 EDT 2008


How to solve this issue:

I have a Class ref and array of Annotation refs, which together compose my Map key.
Since I have no callback hooks for removing this key I need something similar as what WeakHashMap would do if my key was only that Class ref - removing the whole entry when Class ref is GCed.

Is there an easier way than rewriting the whole WeakHM (or some similar construct)?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4151986#4151986

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4151986



More information about the jboss-dev-forums mailing list