Assembling 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 can be installed as a standalone application or can be combined with other modules into an enterprise application.
The Application Assembly Tool (AAT) provides flexibility in assembling EJB modules. Options described below include:
- Importing an existing EJB module (EJB JAR file)
- Creating 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.
- Select File>New>EJB Module.
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.
- 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.
- 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.
- 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.