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.
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:
- 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.
- 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.
- 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.
- Enter values for other properties as needed. View the help for 6.6.1.0.a: Assembly properties for enterprise applications.
- 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.
- 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 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.
- 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.
- Repeat the procedure for additional JAR files or WAR files representing
EJB modules, Web modules, or application clients.
- 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).
- 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.
- Review the contents of the application and make any desired
changes.
- 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.
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.
On the Specifying Application Properties panel:
- 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.
- 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.
- Provide a short description of the application (optional).
- Click Next.
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:
- 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.
- 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.
- If you want to remove a file, select the file in the table and then click
Remove.
- Continue to add or remove files until you have the correct set of
files. Click OK.
- Click Next.
On the Choosing Application Icons panel:
- 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.
- 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.
- Click Next.
On the Adding EJB Modules panel, add one or more EJB JAR
files.
- 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.
- To remove a JAR file, select the file and then click
Remove.
- Continue adding or removing JAR files as needed. When you are
finished adding JAR files, click Next.
On the Adding Web Modules panel, add one or more WAR files to
the application.
- 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.
- To remove a WAR file, select the file and then click
Remove.
- Continue adding or removing files as needed. When you are finished
adding WAR files, click Next.
On the Adding Application Client Modules panel, add one or more
application client JAR files to the application.
- 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.
- To remove a JAR file, select the file and click Remove.
- Continue adding or removing files as needed.
- When you are finished adding application client JAR files, click
Next.
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.
- 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.
- Continue to add security roles as needed. If you need to remove a
role, select the role in the table and then click Remove.
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.
|
|