I suspect we are talking about two completely different issues here.
1. Given two different stateful beans, if I have some notion of 'equality' based upon the detailed state of that bean, how do I
test for equality?
Answer: Write a business method for it, and pass a reference to the other bean.
2. Is it ever possible to have two references to a stateful bean and have isIdentical return true?
Definitely. You obviously can't use home.create() twice and ever have isIdentical be true - you'll have created two separate bean instances. But that is a very limited idea of where bean references come from. You could have obtained beans in a collection, as parameters to a method, or via a handle. In that case you may not know which, if any, of the references are to the actual same bean instance, and the 'equals' method isn't going to cut it. The only way to identify duplicate references to the same actual stateful session bean will be via isIdentical.
[ May 26, 2004: Message edited by: Reid M. Pinchback ]