2.5. Specifying Classes and Interfaces for EJB

To keep some consistency for EJB, each EJB must have the following interfaces and class:

  • The home interface is developed by the bean developer. The Application server provides an implementation for this interface. The home interface should extend javax.ejb.EJBHome. The home interface acts as a factory pattern to create instances of the EJB. It also allows the client to create, remove, or find an EJB.

  • The remote interface is developed by the bean developer and the Application server provides an implementation. It should extend javax.ejb.EJBObject. The remote interface contains the business methods that can be called by the client. The remote interface acts as a proxy.

  • The bean class is developed by ...

Get Sun Certified Enterprise Architect for J2EE™ Technology Study Guide 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.