An EJB module is used to assemble one or more enterprise beans into a single deployable unit.
EJB modules are displayed in the Project Explorer view of the J2EE perspective, and they correspond to EJB projects. You can develop an EJB module in an EJB project and export the module as either a standalone EJB JAR file, or combine the module with other EJB or Web modules within an enterprise application. An EJB JAR file uses the format of a standard Java™ archive file. An EJB module contains the following:
An EJB project is a specialized Java project. Like a Java project, an EJB project must have one or more source folders to contain the source and output files for the project. By default, the source folder is named ejbModule, but you can change that name when you create the project or new source folders. When you publish or deploy the project, the contents of the folder or folders are aggregated.
In the workbench, you create and maintain resources for enterprise applications in projects. An EJB project is a logical module that allows you to organize your enterprise beans. In the Project Explorer view, an EJB project is displayed as an EJB module.
The workbench supports EJB 1.1, EJB 2.0, and EJB 2.1 projects. The J2EE specification level of a containing EAR project must be set to J2EE 1.3 or higher for EJB 2.0 projects, and J2EE 1.4 for EJB 2.1 projects. In an EJB 1.1 project, you will only be able to create EJB 1.1 beans.
The EJB tooling supports the creation of EJB client JAR projects for EJB modules. An EJB client JAR project contains all the interface classes that a client program needs to use the client views of the enterprise beans that are contained in the EJB project. The EJB client project is added as a project utility JAR file to each module that the EJB project belongs to.
By default, when you use the wizard to create an EJB project, an EJB client JAR project is also created. However, you can clear this option in the wizard.
An enterprise bean is a Java component that can be combined with other resources to create distributed client/server applications.
There are three types of enterprise beans: entity beans, session beans, and message-driven beans. Typically, all types of beans are used together within an enterprise application.
Beans requiring data access use data sources, administrative resources defining pools of database connections.
A deployment descriptor contains configuration data that the runtime environment uses for an application. A deployment descriptor can include information about the following:
Deployment descriptors are XML files packaged with the application's files in a Java archive file. An EJB deployment descriptor is called ejb-jar.xml and is located in the META-INF folder of an EJB project. A J2EE application contains one application-level deployment descriptor file, governing the application as a whole. It also contains several component-level deployment descriptors, one for each module in the application.
In addition to standard deployment descriptors, the workbench also includes information on WebSphere Application Server bindings and extensions. The bindings and extensions documents are specific to IBM. Both binding and extension descriptors are stored in XMI files, ibm-ejb-jar-bnd.xmi and ibm-ejb-jar-ext.xmi, respectively. Binding information maps a logical name of an external dependency or resource to an actual JNDI name. For example, the container uses binding information to locate a remote bean at installation. Extensions are additions to the standard descriptors. The extensions enable older (legacy) systems to work in the WebSphere Application Server environment. They are also used to specify application behavior that is vendor-specific, undefined in a current specification, or expected to be included in a future specification.
The Mapping editor helps you to map enterprise beans to databases. The map.mapxmi file holds this mapping information.