Modifying and adding modules to applications

You can modify a module by adding or editing properties, adding components, or removing components. If you are modifying an application (EAR file), you can add new modules or import them. The steps used to modify a module are the same regardless of the type of module. After you make changes to a module, you must save the archive again. If the module contains enterprise beans, you must regenerate deployment code.

This file contains instructions for the following tasks:

Note that after deployment code has been generated for an application, the deployable archive is renamed with the prefix Deployed_ . Any subsequent changes to the archive from within the Application Assembly Tool are applied to the version of the archive that existed prior to code generation. To see changes reflected in your application, you must regenerate deployment code and re-install the deployable archive.


Adding or editing assembly properties

To add properties or edit the existing properties of a module, perform the following steps:

  1. Make sure that the property pane is enabled. From the main menu, click View. If necessary, toggle the Show Property Pane menu item so that it is checked.

  2. If the module is not already opened, click File->Open and select the archive file for the module. The contents of the module are displayed in an Application Assembly Tool window.

  3. In the navigation pane, click the icon for the group of properties that you want to view or edit. If property values exist, a property dialog box is displayed in the property editing pane. If no property values exist, right-click the property icon and choose New. A property dialog box is displayed.

  4. Enter or edit values. Click OK to close the property dialog box. Click Apply to apply the values but to keep the dialog open for additional edits. Click Help to view field help.

There are several alternative methods of accessing the property dialog boxes. These methods apply only to archive files (JAR, WAR, and EAR files) or to module components (enterprise beans or JSP files, for example).


Adding or importing modules into applications

You can add any combination of JAR or WAR files to an enterprise application (EAR file). There are several ways to include archive files:

The procedure for each task is as follows:


Copying and deleting JAR and WAR files

To copy a JAR or WAR file from one module to another:

  1. In the navigation pane of the source module, right-click the icon representing the JAR or WAR file to be copied. Choose Copy.

  2. In the navigation pane of the target module, right-click the folder representing EJB modules or Web modules and choose Paste. Confirm the values displayed in the dialog box. If the target module already contains an archive with the same name, a message is displayed stating that the archive cannot be overwritten. (You can ignore the warning and later rename the archive and modify its properties.)

To delete a JAR or WAR file from a module:

  1. In the navigation pane, right-click the JAR or WAR file. Choose Delete.

Adding enterprise beans and Web components

To add enterprise beans or Web components, use any of the following methods:


Adding files

To add files, perform the following steps:

  1. Right-click the Files icon and choose Add Files. If you are adding files to a Web module, right-click the Class Files, Resource Files, or JAR Files icon.

  2. Select a root directory or archive. The root directory is used to determine the relative path of the files being added. If you are adding an entire archive, select the directory that contains the archive. First, click Browse to navigate to the desired directory or archive. Then select the directory and click Select. The directory structure is displayed in the left pane.

  3. Use the left pane to navigate the contents of the directory. The right pane displays the contents of the selected directory in the left pane.

  4. From the list of files displayed in the right pane, select the desired files, and click Add. If you select a directory and click Add, all files in the directory, including the directory, are added. Relative path names are maintained. To select multiple files, press and hold the Control key while selecting the files. To add a range of files, select the initial file, press and hold the Shift key, and then select the last file in the range.

  5. The files to be added are displayed in the Selected Files pane. When the Selected Files pane contains the correct set of files, click OK.