Architectural overview: Entity beans
Clients share the Home, and may share the bean.
Each client has his own reference to the one and only Home for this bean (say, CustomerBean). But, if two clients are trying to access the same Customer (Fred Smith #420), then both clients have a reference to the same EJBObject. The EJBObject for #420. In other words, the EJBObject is the bodyguard for a particular Customer (like Fred Smith). If all the clients are trying to access Fred Smith #420, they will each have their own stub, of course, but all stubs will communicate with the same Remote EJBObject. And there will be only one bean representing Fred Smith #420. If a client wants to access two different customers, though, the client will have two stubs, and those stubs will be for two different EJBObjects, one for each customer. And that also means two different beans.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access