In Chapter 7, Creating JEE Applications with EJB, we learned that EJBs can be used to create distributed applications. EJBs can act as glue and help different JEE applications in the enterprise to communicate with each other. However, what if the enterprise wants to let its partners or customers make use of some of the application functionality? For example, an airline might want to let its partners make online reservations.
One option is for the partner to redirect its customers to the airline website, but this would not provide a unified experience to users. A better way to handle this would be for the airline to expose its reservation APIs to partners, who can integrate these APIs into their own applications, providing a unified user experience. This is an example of a distributed application, and EJBs can be used for this.
However, for EJBs to work in...