Prev | Next

TOC | Index

J2EETM Developer's Guide
Session Beans


Comparing Session Beans

A client can determine if the object references of two stateful session beans are identical by invoking the isIdentical method:

bookCart = home.create("Bill Shakespeare"); 
videoCart = home.create("Lefty Lee");
. . .
if (bookCart.isIdentical(bookCart)) { 
   // true . . . }
if (bookCart.isIdentical(videoCart)) { 
   // false . . . }
Because stateless session beans have the same object identity, the isIdentical method always returns true when used to compare two such beans.



Prev | Next

TOC | Index


Copyright © 2000 Sun Microsystems, Inc. All rights reserved.