Assemble EJB modules

An EJB module is used to assemble one or more enterprise beans into a single deployable unit. An EJB module is stored in a standard Java archive (JAR) file.

An EJB module contains:

An EJB module can be used as a standalone application, or it can be combined with other EJB modules, or with Web modules, to create a J2EE application. An EJB module is installed and run in an enterprise bean container.

Assemble an Enterprise JavaBeans (EJB) module to contain enterprise beans and related code artifacts. Group Web components, client code, and resource adapter code in separate modules.

An EJB module can be installed as a standalone application or can be combined with other modules into an enterprise application.

The Application Assembly Tool (AAT), which runs on your workstation, provides flexibility in assembling EJB modules. Options described below include:

  1. Start the AAT.
  2. Select File-->New-->EJB Module. The navigation tree displays various sets of properties for configuring the new EJB module.
  3. (Optional) Use the property dialog shown in the AAT workspace to change the default file name and location.
    1. It is recommended that you change the display name so that it differs from the file name.
    2. If you like, change the temporary location of the EJB module from the default location, install_root/bin.

  4. Add at least one EJB component to the module.

    • Add at least one enterprise bean to the EJB component. Use one or more of these methods:

      • Import an existing JAR or EAR file containing EJB components.

        • In the Navigation pane, right-click the EJB Components icon.
        • Select Import from the pop-up menu.
        • Click Browse to locate the archive file to import.
        • Click Open to display the contents of the archive file.
        • Select an EJB application from the archive file.
        • Select the servlets or JSP files to be added and click Add to display the components in the Selected Components window.
        • Click OK to add the selected components.

      • Copy and paste values from an existing module.
      • Create a new EJB component.

        • In the Navigation pane, right-click the EJB Components icon.
        • Select New from the pop-up menu.
        • Enter the component name and archive type.
        • Select class files.
        • Click OK in the New EJB Component property dialog.
        • Enter properties for the EJB component as needed. For information on the properties, see Assembly settings.

  5. Enter assembly properties for each bean.
    1. Click the plus sign (+) next to the component instance to show property groups.
    2. Right-click the icon for a property group.
    3. Select from the pop-up menu to add new values, or edit existing values in the property pane. For information on the properties, see Assembly settings.

  6. Add any other files needed by the application.
    1. Right-click the Files icon.
    2. Select Add Files from the pop-up menu.
    3. Select Browse to navigate the directory structure.
    4. Click Select to open an archive.
    5. Select the files to add and click Add.
    6. In the Selected Files window, click OK to add the files.