O'Reilly logo

Building Scalable and High-Performance Java™ Web Applications Using J2EE™ Technology by Greg Barish

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How EJBs Work

Under the J2EE model, EJBs are distributed objects managed by containers. The real work is done by individual bean instances. The container provides surrogates (EJB objects) that interact with these instances, on behalf of the client. It's responsible for the creation and destruction of beans as necessary—in other words, for the lifecycle of its bean instances. The relationship between clients, the EJB container, and bean instances is shown in Figure 8-1.

Figure 8-1. Interaction of EJB clients, containers, and bean instances

As the figure shows, a client communicates with an EJBObject, provided by the EJB countainer. There are actually ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required