Ok I see, I missed the part in your code where you create a WeakHashMap of WeakHashMaps (1 per document). I think then you only want the outer map to be a WeakHashMap and not the inner map, right?
Davanum Srinivas wrote:
See difference between WeakHashMap and HashMap at http://www.onjava.com/pub/a/onjava/2001/07/09/optimization.html?page=2
Basically then the document is gc'ed, i want to get rid of the weakhashmap of the element/id pair's in that document.
thanks, dims
--- Sean Mullan <[EMAIL PROTECTED]> wrote:
Hmm, why a WeakHashMap? That seems kind of dangerous if the programmer is not aware you are using a WeakHashMap because entries could be removed if you don't maintain a reference to the key. Or maybe I am missing something.
Davanum Srinivas wrote:
Updated bugzilla with a patch that does the following: - removed the code that registers the id using the xerces hack - instead store the id/element pair in WeakHashMap's (ONE per document, also a WeakHashMap) - getElementById looks first in our WeakHashMap table, then looks in uses
"doc.getElementById(id)"
This should satisfy both requirements: - get rid of xerces dependency hack for id's that we register. - still use standard DOM calls to "GET" id's from the document if it is not registered by us.
Bugzilla: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26789
-- dims
--- Scott Cantor <[EMAIL PROTECTED]> wrote:
I guess the unstated point I'm trying make here is that the best world is one in which the standard DOM calls are used in addition to whatever one-off solution the libraries decide to implement.
It should be simple to conditionally call those methods (if they exist) as a consequence of the proprietary calls. And enable/disable the proprietary schema as a library option.
-- Scott
===== Davanum Srinivas - http://webservices.apache.org/~dims/
===== Davanum Srinivas - http://webservices.apache.org/~dims/