Looking Inside an EJB

Generally, an EJB consists of two interfaces and one class. The interfaces are the home and component interfaces, and the class is the bean class. Figure 1.3 illustrates what's inside an EJB, and how a client interfaces with it.

Figure 1.3. Looking inside an EJB.

The home interface lists the available methods for creating, removing, and finding EJBs in the container. The home object is the implementation of the home interface that's generated by the container at deployment time. At runtime, the home object will be used by the client in conjunction with a naming service to find the component and establish a connection to its ...

Get Sams Teach Yourself EJB in 21 Days 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.