Java Platform, Enterprise Edition (Java EE) 8
The Java EE Tutorial

Previous Next Contents

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. See Packaging Enterprise Beans in EJB JAR Modules and Packaging Enterprise Beans in WAR Modules for more information.

Previous Next Contents
Oracle Logo  Copyright © 2017, Oracle and/or its affiliates. All rights reserved.