InfoCenter Home >
6: Administer applications >
6.6: Tools and resources quick reference >
6.6.0: About user assistance >
6.6.0.5: Using the Application Assembly Tool interface >
6.6.0.5.1: Modifying and adding modules to applications

6.6.0.5.1: 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).

  • Right-click the icon representing the archive or component. Choose Properties. A property dialog box is displayed. Edit the properties and click OK.

  • Click the icon representing the archive or component. Click the Properties icon on the tool bar. A property dialog box is displayed. Edit the properties and click OK.

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:

  • Import an existing JAR or WAR file.

  • Open an existing EJB or Web module and copy and paste individual beans or Web components into the application.

  • Create a new JAR or WAR file.

The procedure for each task is as follows:

  • To import archive files into the application, right-click the icon corresponding to the type of module (EJB module, Web module, or application client module) and choose Import. Use the file browser to locate and select the archive file. Click Open. The JAR or WAR file is displayed under the appropriate folder. The imported module's properties are also imported. Click the plus sign (+) next to the archive's icon to view its contents and edit its properties if needed.

  • To copy portions of an existing module, open the module by clicking File->Open and selecting the file. Arrange the windows so that both the EAR file and the source archive are visible. Use a copy-and-paste operation to copy archives or components to the current module.

  • To create a new JAR or WAR file to be included in the application, right-click the folder corresponding to the type of module to create (EJB Modules, Web Modules, and Application Clients), and choose New. Enter required values as indicated. Optionally, enter values for other properties. Click OK. The JAR or WAR file is displayed under the appropriate folder. Click the plus sign (+) to verify contents and enter assembly properties.

    For EJB modules, you must add at least one enterprise bean. Right-click the folder corresponding to the type of bean to create (session bean or entity bean), and choose New or Import. For entity beans, choose whether you are creating a CMP or BMP bean. A property dialog box is displayed. Enter required values as indicated. Optionally, enter values for other properties. Click OK. The enterprise bean is displayed in the navigation pane. Click the plus sign (+) to verify the contents and enter assembly properties.


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:

  • Import the item into the module. In the navigation pane, right-click the Web modules, EJB modules, or Application Client folder and choose Import. Browse the file system and locate the desired archive file. When the file is located, click Open. If you are importing an EAR file, you are prompted to select which WAR or JAR files to import. Click the desired archive and click OK. As prompted, enter or verify properties for the imported archive.

  • Use a copy-and-paste operation to copy components from an existing module.

  • Create a new item by right-clicking the appropriate icon (for example, the icon representing entity beans or Web components) and choose New. Click Browse to locate the class files of the enterprise bean or Web component. By default, the root directory or archive is the current archive. If needed, browse the file system for the directory or archive where class files reside. After you choose a directory or archive, its file structure is displayed. Expand the structure and locate the files that you need. Select the file and click OK. In the property dialog box, click OK. Verify that the enterprise beans or Web components are added to the module (expand the hierarchy in the navigation pane).

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.
Go to previous article: Using the Application Assembly Tool interface Go to next article: Generating deployment code for modules

 

 
Go to previous article: Using the Application Assembly Tool interface Go to next article: Generating deployment code for modules