Assemble EJB modules
Before you begin
If you want to use existing Java 2 Platform, Enterprise Edition (J2EE) Version 1.2 modules in your J2EE Version 1.3 application, migrate them to the Version 1.3 specification first.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 is installed as a stand-alone application or is combined with other modules into an enterprise application.
To increase performance, break CMP enterprise beans into several enterprise bean modules during assembly. The load time for hundreds of beans is improved by distributing the beans across several JAR files and packaging them to an EAR file. Load time is faster when the administrative server attempts to start the beans, for example, 8-10 minutes versus more than one hour when one JAR file is used.
The Application Assembly Tool (AAT) provides flexibility in assembling EJB modules. Options described below include:
- Importing an existing EJB module (EJB JAR file)
- Create a new EJB module
- Copying code artifacts (such as entity beans) from one EJB module into a new EJB module
Steps for this task
- Start the AAT.
- From the New tab, select EJB Module. Click OK.
The navigation tree displays various sets of properties for configuring the new EJB module.- (Optional) Use the property dialog shown in the AAT workspace to change the default file name and location.
- It is recommended that you change the display name so that it differs from the file name.
- If you like, change the temporary location of the EJB module from the default location, install_root/bin.
- Add at least one EJB component to the module.
- Add at least one enterprise bean to the EJB component.
- 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. The applications in the selected archive file display.
- 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 the class files.
- Click OK in the New EJB Component property dialog.
- Enter properties for the EJB component as needed.
- Enter assembly properties for each bean.
- Click the plus sign (+) next to the component instance to show property groups.
- Right-click the icon for a property group.
- Select New from the pop-up menu to add new values, or edit existing values in the property pane.
If you change the session type (stateful or stateless) of a session bean, click Apply before making any other changes to the same bean. Otherwise, certain input fields on the GUI become inactive. (You will know they are inactive because they are grayed out on the GUI.) After making all of your changes, click Apply again to commit them.
- Add any other files needed by the application.
- Right-click the Files icon.
- Select Add Files from the pop-up menu.
- Select Browse to navigate the directory structure.
- Click Select to open an archive.
- Select the files to add and click Add.
- In the Selected Files window, click OK to add the files.
What to do next
Assemble any other new modules of your choice:
- EJB modules
- Application client modules
- Resource adapter modules
You can also migrate existing modules.
Another option is to proceed directly to assembling a new application module. While assembling an application module, you can create any new modules that you need.