Assemble the application: Assemble the application

A J2EE application is represented by and packaged in an enterprise archive (EAR) file. You must assemble your EJB module and your application client into an EAR file, which you can then install into an application server. Use the application assembly tool to package your EJB module and application client into an EAR file:

  1. Start the application assembly tool. On your workstation, select Start --> Programs -> IBM Websphere -> Application Server v5.0 -> Application Assembly Tool.

    Note: If you already have the application assembly tool open, select the File -> New -> Application menu item.

  2. The Welcome to the Application Assembly Tool window is displayed. On the New tab, click Application, and click OK.

    The application assembly tool uses a navigation bar to access various parts of the interface. The EAR file has a default name and directory structure and contains general EAR file information.

  3. Set up general application file information.

    • On the General tab, specify the following:

      • In the Display name field, specify MDBSamples.
      • Optionally, you can specify a description in the Description field.
      • Click Apply.

  4. Import the EJB module.

    • In the navigation bar, right-click EJB Modules, and click Import.
    • Navigate to PSSampleMDB.jar, and click Open.
    • Click OK in the Confirm Values window that appears.

  5. Import the application client.

    • In the navigation bar, right-click Application Clients, and click Import.
    • Navigate to PSSampleClient.jar, and click Open.
    • Click OK in the Confirm Values window that appears.

  6. Save your EAR file.

    • Select the File -> Save menu item to save your application in the mdbsamp folder.
    • Save your application as MDBSamples.ear.
    • Click OK.

  7. Optionally, you can configure security on your EJB module so that all authenticated users are authorized to the enterprise bean's methods.

    • In the navigation bar, right-click Security Roles, and click New.
    • On the General tab, specify ALL Role in the Name field.
    • Optionally, you can specify a description in the Description field.
    • On the Bindings tab, click Add next to the Special subjects: Name field.
    • Select AllAuthenticatedUsers, and click OK.
    • On the Bindings tab, click OK to save your changes.
    • In the navigation bar, expand Entity Beans, expand PSSampleMDB, right-click Security Roles, and click New.
    • On the General tab, specify All Role in the Name field.
    • Optionally, you can specify a description in the Description field.
    • Click OK.
    • In the navigation bar, right-click Method Permissions, and click New.
    • Optionally, you can specify a name in the Method permission name field and a description in the Description field.
    • Next to the Methods field, click Add.
    • Expand PSSampleMDB.jar, and select PSSampleMDB(*).
    • Click OK.
    • Next to the Role field, click Add.
    • Select All Role, and click OK.
    • On the General tab, click OK to save your changes.
    • Click Save to save the MDBSamples.ear file with the updated security information.

  8. Once the file is saved, click Close.

Continue Next: Configure the application client