Architectural overview: Creating a Stateless Session bean
After getting a Home stub, the client calls “create” on the Home. The Home gives the client a stub to an existing EJBObject but does not associate a bean with this EJBObject! Instead, the bean stays in a pool until the client uses the EJBObject stub to call a business method.

The client calls create() on the Home stub (create() is a method in the Home interface).
The stub sends the create() call to the Remote Home object.
The Home/container steps in and adds its services.
An EJBObject is created for this client.
The bean stays in the bean pool! It comes out only to service an actual business method, if the client invokes one on the EJBObject stub.
The EJBObject stub is returned to the client, so the client can call business methods on the Component interface.

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