<br><font size=2 face="sans-serif">Hi,</font>
<br>
<br><font size=2 face="sans-serif">I have a similar problem when using
objects from an external framework as facts : the equals method is invoked
despite using the </font><font size=2 color=#0021bf face="Courier New"><i>WM_BEHAVIOR_IDENTITY</i></font><font size=2 face="sans-serif">property.</font>
<br>
<br><font size=2 face="sans-serif">Here is an exmple reproducing this with
JBoss Rules 3.0.5 : I have created a JBoss Rules project under Eclipse,
and created 2 classes MyObject and MyObject2. </font>
<br><font size=2 face="sans-serif">These classes have hashCode() returning
0 and equals throwing a ClassCastException when comparing 2 object of different
classes</font>
<br>
<br>
<br>
<br><font size=2 face="sans-serif">Actually, after debugging a bit, it
seems that the equals method is invoked by the TruthMaintenanceSystem.assertMap,
which has a hardcoded EqualityKeyComparator (never set to IdentityKeyComparator).
</font>
<br><font size=2 face="sans-serif">The WorkingMemory.assertMap has its
KetComparator set correctly to IdentityKeyComparator</font>
<br><font size=2 face="sans-serif">Also, the equals method is not called
when the hashCode() method returns different values for different objects,
which makes it a bit harder to reproduce the issue.</font>
<br>
<br><font size=2 face="sans-serif">This is a roadblock for using JBoss
Rules in our context ; has someone any idea for a workaround?</font>
<br>
<br><font size=2 face="sans-serif">Thanks in advance,</font>
<br><font size=2 face="sans-serif">Guillaume</font>
<br><pre>*************************************************************************
This message and any attachments (the "message") are confidential and intended solely for the addressee(s).
Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration.
Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified.
************
Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et etablis a l'intention exclusive de ses
destinataires. Toute utilisation ou diffusion non autorisee est interdite. Tout message electronique est susceptible d'alteration.
La SOCIETE GENERALE et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie.
*************************************************************************
</pre>