I understand that the EJB spec says that you have to use isIdentical instead of 
equals to compare two entities, but I'm curious about why this is.  After all, 
if you have an isIdentical method, can't equals be implemented along the 
following (pseudo-code) lines?

    public boolean equals(Object o) {
  |         if( o is an instance of an EJB )
  |             return this.isIdentical( (cast-to-EJB) o);
  |         else
  |             return false;
  |     }
  | 
There must be a good reason. I just can't think what it is!

Thanks,
Nick

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3875463#3875463

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3875463


-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to