jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting" <jukka.zitt...@gmail.com>
Subject Re: Question about JCR nodes and hash code.
Date Fri, 08 Jun 2007 17:42:58 GMT
Hi,

On 6/8/07, Andre Scheunemann <andres@toonboom.com> wrote:
> I have a situation where I'm building a cache of JCR nodes and I use
> node.hashCode() as my key.

Note that it entirely possible for two different nodes to have the
same hash code! I would strongly advice against using the hash code
for anything like that.

How about using the path of the node as the key? Alternatively, if
your node are all referenceable, you could use UUIDs as keys.

BR,

Jukka Zitting

Mime
View raw message