Architectural overview: Creating a Stateful Session bean

After getting a Home stub, the client calls “create” on the Home. The Home creates the bean and the EJBObject for the bean and hands back the EJBObject stub.

image with no caption
  1. The client calls create() on the Home stub (create() is a method in the Home interface).

  2. The stub sends the create() call to the Remote Home object.

  3. The Home object steps in and adds its services.

  4. The EJBObject is created/instantiated for the bean.

  5. The bean itself is instantiated.

  6. The EJBObject stub is returned to the client, so the client can call business methods on the Component interface.

Get Head First EJB now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.