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:
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 ...