boolean isIdentical(Object o)
If you’ve got two stubs, and you want to know if they refer to the same bean, you call isIdentical on one reference, passing in the reference you want to compare it against. Just like the way you use the equals() method.
The trick is, stateless session beans, stateful session beans, and entity beans each have different rules for what causes isIdentical() to return true.
Stateless session beans
True if both references came from the same home, even if the stubs are referring to two different Remote EJB objects! To the server, one stateless bean is as good as any other bean from the same home, because the client would never be able to tell the difference (since the bean can’t hold any client-specific state).
Stateful session beans
False no matter what, for any two unique stubs, even if from the same home. After all, my shopping cart isn’t the same as yours!
True if the stubs refer to two entities with the same ...