3.5 The Contents of an Enterprise Bean
To develop an enterprise bean, you must provide the following files.
- Enterprise bean class: Implements the business methods of the enterprise bean and any lifecycle callback methods.
- Business interfaces: Define the business methods implemented by the enterprise bean class. A business interface is not required if the enterprise bean exposes a local, no-interface view.
- Helper classes: Other classes needed by the enterprise bean class, such as exception and utility classes.
Package the programming artifacts in the preceding list either into an EJB JAR file (a stand-alone module that stores the enterprise bean) or within a web application archive (WAR) module. For more information, see Section 5.2.1, “Packaging Enterprise Beans in EJB JAR Modules,” and Section 5.2.2, “Packaging Enterprise Beans in WAR Modules,” both in The Java EE 7 Tutorial, Volume 1.