InfoCenter Home >
6: Administer applications >
6.6: Tools and resources quick reference >
6.6.1: Administering applications (overview) >
6.6.1.5: Administering applications with Application Assembly Tool >
6.6.1.5.1: Creating an application

6.6.1.5.1: Creating an application

J2EE applications can be created by using property dialog boxes or by using a wizard.


Using the property dialog boxes

Creating a new enterprise application consists of specifying the archive files that are to be included in the application and then adding assembly instructions. Follow these steps to create a new application:

  1. Click File->New-> Application. The navigation pane displays a hierarchical structure used to build the contents of the application. The icons represent EJB modules, Web modules, application client modules, assembly properties, and files comprising the application. A property dialog box containing general information about the application is displayed in the property pane.

  2. By default, the EAR file name and the application display name are the same. It is recommended that you change the display name in the property pane.

  3. By default, the temporary location of the EAR file is installation_directory/bin. You must specify a new file name and location by clicking File->Save. You must add at least one module (archive) before saving the application.

  4. Enter values for other properties as needed. View the help for 6.6.1.0.a: Assembly properties for enterprise applications.

  5. Add archive files to the application. You can add any combination of JAR or WAR files. 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.

  6. 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.

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

  8. 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.

  9. Repeat the procedure for additional JAR files or WAR files representing EJB modules, Web modules, or application clients.

  10. Define security properties for the application. Right-click the Security Roles icon and click New. Enter values on the property dialog box and then click OK. View the help for 6.6.1.0.1.a: Assembly properties for security roles (application).

  11. Add supplementary files needed by the application. Right-click the Files icon in the navigation pane and choose Add Files. Click Browse to navigate to the desired directory or archive. Click Select. If you are adding an entire archive, select the directory that contains the archive. The directory structure is displayed in the left pane. Browse the directory structure. From the right pane, select one or more files to be added and click Add. If you select a directory and click Add, all files in the directory, including the directory, are added. The selected files are displayed in the Selected Files window. Relative path names are maintained. When the Selected Files window contains the correct set of files, click OK.

  12. Review the contents of the application and make any desired changes.

  13. Save the application EAR file. Click File->Save. Enter a name for the application, for example, temp.ear. Click Save. A dialog box confirming the save operation is displayed. Click OK.

Using the Create Application wizard

Use this wizard to create an enterprise application. An enterprise application can consist of one or more EJB modules, Web modules, or application clients, and a deployment descriptor. During creation of the application, you specify the archive files for each module to be included in the application. You also specify other information about the application, such as security roles.

You can create new EJB modules, Web modules, and application client modules, or import existing modules. When the wizard is completed, your application is packaged in an EAR file and resides in the directory location that you specified.

To create an enterprise application, click the Wizards icon on the tool bar and then click Application. Follow the instructions on each panel.

Specifying application properties

On the Specifying Application Properties panel:

  1. Specify a display name for the application (required). The display name is used to identify your application in the Application Assembly Tool and can be used by other tools.

  2. Specify a file name for the application (required). The file name specifies a location on your system where the EAR file is to be created.

  3. Provide a short description of the application (optional).

  4. Click Next.

Adding supplementary files

On the Adding Supplementary Files panel, specify the location of additional files to be included in your application. These are files other than the J2EE modules to be included--for example, libraries and utilities needed by the application. To add or remove files:

  1. Click Add. Use the file browser to locate and choose one or more files to add to the application. First, browse for the root directory or archive where the files are located and click Select. If you are adding an entire archive, select the directory that contains the archive.

  2. The directory structure is displayed in the left pane. Browse the directory structure. From the right pane, select one or more files to be added 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. The selected files are displayed in the Selected Files window. Click OK. The files are displayed in a table on the wizard panel.

  3. If you want to remove a file, select the file in the table and then click Remove.

  4. Continue to add or remove files until you have the correct set of files. Click OK.

  5. Click Next.

Choosing application icons

On the Choosing Application Icons panel:

  1. Specify the full path name of a small icon, or click Browse to locate and select the file. The icon must be a GIF or JPEG image 16x16 pixels in size.

  2. Specify a full path name of a large icon, or click Browse to locate and select the file. The icon must be a GIF or JPEG image 32x32 pixels in size.

  3. Click Next.

Adding EJB modules

On the Adding EJB Modules panel, add one or more EJB JAR files.

  1. To add JAR files, click Add. Use the file browser to locate and select the files, and then click Open. As prompted, verify or enter a file name and alternate deployment descriptor for the JAR file. Click OK. The JAR files are displayed in a table on the wizard panel.

  2. To remove a JAR file, select the file and then click Remove.

  3. Continue adding or removing JAR files as needed. When you are finished adding JAR files, click Next.

Adding Web modules

On the Adding Web Modules panel, add one or more WAR files to the application.

  1. To add WAR files, click Add. Use the file browser to locate and select the files and then click Open. As prompted, verify or enter a file name and context root for the WAR file. Click OK. The WAR files are displayed in a table on the wizard panel.

  2. To remove a WAR file, select the file and then click Remove.

  3. Continue adding or removing files as needed. When you are finished adding WAR files, click Next.

Adding application client modules

On the Adding Application Client Modules panel, add one or more application client JAR files to the application.

  1. To add JAR files, click Add. Use the file browser to locate and select the files and then click Open. As prompted, verify or enter a file name and alternate deployment descriptor for the JAR file. Click OK. The JAR files are displayed in a table on the wizard panel.

  2. To remove a JAR file, select the file and click Remove.

  3. Continue adding or removing files as needed.

  4. When you are finished adding application client JAR files, click Next.

Adding security roles

On the Adding Security Roles panel, specify a security role that a principal must be granted in order to access the application. These security roles must be unique to the application. Any security roles defined in the application's modules are also displayed in the table on this panel.

  1. Click Add. Type a role name (required). Optionally, enter a description of the role. View the help for 6.6.5.0.5: Assembly properties for security roles. Click OK. The role and its description are displayed in a table on the wizard panel.

  2. Continue to add security roles as needed. If you need to remove a role, select the role in the table and then click Remove.

Setting additional properties and saving the archive

Click Finish to complete the wizard. To change settings for properties, click Back to return to the appropriate panel. Make any needed changes, and then click Finish.

After you click Finish, the contents of the archive are displayed in the navigation pane. You can continue adding or modifying properties as needed. For example, you can add binding information. When you are finished editing the archive, click File->Save to save the archive file.

Go to previous article: Administering applications with Application Assembly Tool Go to next article: Administering nodes (overview)

 

 
Go to previous article: Administering applications with Application Assembly Tool Go to next article: Administering nodes (overview)