From Paul SCBCD, chapter three, method 'isIndentical()' in remote component interface checks whether two EJB Ojects are identical or not. In case, there are multiple accesses to the same EJBHome, multiple EJBObjects and bean instances will be created to serve each access individually. Thus, the EJBOjbects will be difference and the 'isIndentical()' method will return false. However, the book said that for stateless session bean, 'isIndentical()' always return true. Please advise.
To put things simply, the Stateless session bean is not client specific, and the EJBObjects generated by the same home would evaluate to true... thus for all stateless session beans the isIdentical() method will return true...
For stateful session beans, there are also only one EJBHome for multiple accesses from clients. In case, all clients use the create() method in the EJBHome, there is not client specific also. In this case, can we say that all stateful session beans the isIndentical() method return true??? Please correct if I am wrong.
posted 13 years ago
Please remember that for each stateful session object, the container assigns a unique identity, since they are specific to each client.
Thus in the case of statful SB, the isidentical() method will always evaluate to false for diff. ejb objects, though both of them are from the same home...