BTW, the code is out of the PrimaryKey class which is what JBoss3.2.0 is complaining about.
I assume is the implementation from
Your implementation is incorrect, you are
checking object reference equality not object
i.e. this == otherKey
new CustomerEntityKey() == new CustomerEntityKey()
You should have something like:
public class PrimaryKey
public String myKey1;
public boolean equals(Object test)
if (test == this) return true;
if (test == null || !(test instanceof PrimaryKey)) return false;
PrimaryKey other = (PrimaryKey) test;
public int hashCode()
That took care of it. Thanks!!!