EJB spec says that PK class has to return a hashcode. What is the best way to 
implement this? My problem is, hashCode has to
be int, and my PK is a compound key of three ints! I often saw:

(PK1 + PK2 + PK3).hashCode()

but PK1+PK2+PK3 can throw overflow (maxint+maxint+maxint>maxint!).

So what would be the best solution?

Reply via email to