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

Client/EJB Integration

Now that we've explained the differences between the various bean types and have seen how they're developed, we can look at how clients actually interact with EJBs. Per the J2EE architecture, a client can be one of the following:

  • An applet

  • A servlet

  • Another EJB

  • A Java Message Service (JMS) provider (depending on the bean)

Generally, a client uses the home interface and either the remote or the local interfaces of an EJB in order to communicate with it. Choosing remote or local is, for the most part, only applicable if the client resides on the same machine as its target.

We've seen how one EJB can communicate with another in our example BenefitEnrollerBean (Listing 8-7, lines 90 through 95). Now let's take a look at another ...

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