Assembling new or modifying existing modules
Before you begin
Ensure code artifacts, such as servlets, JSP files, enterprise beans, and application clients are assembled into their respective modules.If you want to use existing J2EE 1.2 modules in your J2EE 1.3 application, migrate these modules to J2EE 1.3 first. Also migrate any J2EE 1.2 application modules to which you want to add J2EE 1.3 modules.
You are now ready to combine your new or migrated modules into an application module Enterprise application (EAR file).
The Application Assembly Tool (AAT) provides flexibility in assembling applications from various Webapp (WAR), Resource adapter (RAR), Enterprise beans (EJB JAR), and application client (JAR) files. Options described below include:
Steps for this task
- Start the AAT.
- Click File > New > Application if you did not already specify to create a new application module.
Each of the next three steps is optional, but perform at least one of them.- (Optional) Import existing modules into the application module.
- Right-click the folder for the type of module you want to import, such as an EJB Module, in the navigation tree.
- Click Import from its right-click menu.
- Use the file browser to locate and select the archive file for the module.
- Click Open. The archive file appears under the appropriate folder in the navigation tree.
- Click the plus sign (+) next to the icon for the archive, to view the module contents and edit its properties if needed.
- Save the application module.
- (Optional) Create a new archive file to include in the application.
- Right-click the folder for the type of module to create (such as Enterprise bean (EJB) modules, Webapp modules (WAR), Resource adapter (RAR) files, or application client modules) in the navigation tree.
- Click New from its right-click menu.
- Configure properties of the new module when it is displayed.
- Click OK. The archive file is displayed under the appropriate folder.
- Click the plus sign (+) to verify file contents and enter assembly properties.
- Add enterprise beans, if this is an EJB module.
- Right-click the folder corresponding to the type of bean to create (session bean or entity bean), and click New or Import.
- Configure properties of the enterprise bean when it is displayed.
- Click OK. The enterprise bean appears in the navigation pane.
- Click the plus sign (+) to verify file contents and enter assembly properties.
- (Optional) Copy code artifacts, such as servlets, from one module to another of the same type, to reside in the new application.
- Identify the code artifact to copy, and the type of module in which it resides. Make sure you already have the same kind of module (such as a Web module) created in the new application module.
- Open a separate, existing module in the AAT by selecting File > Open from the menu bar.
- Arrange the AAT workspace so that you can see both the new application module and the source archive containing the code artifact.
- Copy and paste the code artifact from the source module to the same module type in the new application.
For example, copy a container managed persistence (CMP) bean from the source EJB module into the new EJB application module.- Save the application module.
- Continue to add desired modules to the application module.
- Define security properties for the application.
- Right-click the Security Roles icon in the navigation tree.
- Click New.
- Configure the security properties.
- Click OK.
- Add supplementary files needed by the application.
- In the navigation tree, right-click the Files icon and select Add Files.
- Add files, using the Add Files dialog.
- Save the application module.
Results
Performing application assembly results in a J2EE 1.3 compliant EAR file containing one or more WAR, RAR, or JAR files.
Note: If you use the Application Assembly Tool to create application client modules, also use the Application Client Resource Configuration Tool. This tool allows you to define references to resources (other than enterprise beans) on the machine where the application client resides.
What to do next
Verifying archive files. Generating code for deployment.After an application is assembled and you generate your application code for deployment, use the administrative console to install the application in an appserver.
Use the administrative console at installation time to carry out the security instructions defined in the deployment descriptor and to locate required external resources, such as enterprise beans and databases. You can add configuration properties and redefine binding properties defined in the Application Assembly Tool.
After the application is deployed, you can use the Application Assembly Tool to modify the application by adding or removing modules, editing deployment descriptor properties and regenerating code for deployment.
Note: If your application has a large number of modules, it might not install successfully onto a server. Package your application so the .ear file has as few modules as are necessary. Modules can include metadata for the modules such as information on deployment descriptors, bindings and IBM-specific extensions.