The equals discussion we did we rickard when he was here.
It boils down to this: the way to overwrite the equals is with the equals in
the MO (that compares bytes). If that is fast enough (does anyone know)
then we can safely go with that instead of the precomputed one. If that is
not fast enough there is a way to make it work with incremented keys and
maps between the keys and the MO hash and equals. A bit trickier but safe
and will work 100% times. So we can cover both bases.
So I repeat the question, does anyone know how fast is a mo1.equals(mo2)
(byte[] equals ) if that is fast then we are safe.
marc
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Bordet, Simone
> Sent: Thursday, October 05, 2000 9:37 AM
> To: jBoss Development Mailing List (E-mail)
> Subject: [jBoss-Dev] Cache key equals
>
>
> Hey Marc,
>
> there is a special reason for CacheKey.equals being implemented
> as hashCode
> equality ?
> It was done to save the externalization of a MarshalledObject ?
> I'm worried if 2 different MO have by chance the same hash...
>
> And why InstanceCache.remove gets a PK object instead of the CacheKey
> (didn't understood the javadoc comment).
>
> BTW, stateful cache runs nicely, I'm almost done also with entity. Added
> reentrant EJBObject calls to stateful (now is broken). Still to do some
> performance test, but going on well...
>
> Many Thanks
>
> Simon
>
>