Comparing primary keys is valid only when comparing objects obtained from the same home interface.When objects are obtained from different home interfaces,the client must use the isIdentical method on one of the objects to perform the comparison.
Yes you can compare Primary key class using equals method (if primary key class override equals and hashCode) for testing on entity bean has same value. but isIdentical method is locate on EJBObject or EJBLocalObject. You can use isIdentical for session bean or entity bean but if you use primary key equals method you can use only entity bean. hope this help.
Oh what I know is that equals() is for objects on the same heap and isIdentical() is for objects on the remote heap... That's a simple concept for the difference between equals() and isIdentical()... Just my 2 cents...
Co-author of SCMAD Exam Guide, Author of JMADPlus SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0