[Fix Pack 5.0.2 and later]Assemble new or modifying existing modules

Before you begin

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 Web application (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)
  • Create 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

Steps for this task

  1. Start the AAT.
  2. 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.
  3. (Optional)   Import existing modules into the application module.

    1. Right-click the folder for the type of module you want to import, such as an EJB module, in the navigation tree.
    2. Click Import from its right-click menu.
    3. Use the file browser to locate and select the archive file for the module.
    4. Click Open. The archive file appears under the appropriate folder in the navigation tree.
    5. Click the plus sign (+) next to the icon for the archive, to view the module contents and edit its properties if needed.
    6. Save the application module.

  4. (Optional)   Create a new archive file to include in the application.

    1. Right-click the folder for the type of module to create (such as enterprise beans (EJB) modules, Web application modules (WAR), resource adapter (RAR) files, or application client modules) in the navigation tree.
    2. Click New from its right-click menu.
    3. Configure properties of the new module when it displays.
    4. Click OK. The archive file displays under the appropriate folder.
    5. Click the plus sign (+) to verify file contents and enter assembly properties.
    6. Add enterprise beans, if this is an EJB module.
    7. Right-click the folder corresponding to the type of bean to create (session bean or entity bean), and click New or Import.
    8. Configure properties of the enterprise bean when it displays.
    9. Click OK. The enterprise bean appears in the navigation pane.
    10. Click the plus sign (+) to verify file contents and enter assembly properties.
    11. Save the application module.

  5. (Optional)   Copy code artifacts, such as servlets, from one module to another of the same type, to reside in the new application.

    1. 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.
    2. Open a separate, existing module in the AAT by selecting File > Open from the menu bar.
    3. Arrange the AAT workspace so that you can see both the new application module and the source archive containing the code artifact.
    4. 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.
    5. Save the application module.

  6. Continue to add desired modules to the application module.
  7. Define security properties for the application.

    1. Right-click the Security Roles icon in the navigation tree.
    2. Click New.
    3. Configure the security properties.
    4. Click OK.

  8. Add supplementary files needed by the application.

    1. Right-click the Files icon in the navigation tree, and select Add Files.
    2. Add files, using the Add Files dialog.

  9. 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, 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:

  1. Verify archive files.
  2. Generate code for deployment.
  3. Use the administrative console to install the application onto an application server.

    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.

  4. 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.
  5. 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.