Alex Kluge wrote:
Hi,
I expect that using the Object hashCode, even within the same
VM, will be problematic. Two instances of such a class will not have
the same hashCode. Hence using one as a key to insert a value into
the cache, then using the other to retrieve the value will not
produce the expected results. This is true of pretty much any type
of hash table, distributed or not. Your key can not use the Object
hashCode method.
Sure, in that case it becomes an object identity table (e.g.
IdentityHashMap), which is fine for some specific uses.
--
Jason T. Greene
JBoss, a division of Red Hat