Assembling new or modifying existing modules
Ensure that 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 in assembling applications include:
- Importing an existing module (JAR, RAR or WAR file)
- Creating a new module while you create the new application
- Copying code artifacts, such as servlets, from one module to another of the same type, to reside in the new application
- Start the AAT.
- From the New tab, select Application, and click OK, 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 beans 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 displays.
- Click OK. The archive file displays 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 displays.
- Click OK. The enterprise bean appears in the navigation pane.
- Click the plus sign (+) to verify file contents and enter assembly properties.
- Save the application module.
- (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 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.
- Right-click the Files icon in the navigation tree, and select Add Files.
- Add files, using the Add Files dialog.
- Save the application module.
Results
You are 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. Using this tool, you can define references to resources (other than enterprise beans) on the machine where the application client resides.
What to do next
After assembling an application, you can do the following:
- Verify archive files.
- Generate code for deployment.
- Use the administrative console to install the application onto an appserver.
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 extensions.
- 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. One can add configuration properties and redefine binding properties defined in the Application Assembly Tool.
- After the application deploys, use the Application Assembly Tool to modify the application by adding or removing modules, editing deployment descriptor properties and regenerating code for deployment.
Migrating application modules from J2EE 1.2 to J2EE 1.3
EJB reference assembly settings
Message-driven bean assembly settings
Resource environment reference assembly settings
Resource Adapter Archive file assembly settings
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.