Enterprise applications are Java 2 Platform, Enterprise Edition
(J2EE) applications that can be deployed onto an application server. Enterprise
applications are projects comprised of enterprise bean modules, Web modules,
connector modules, application client modules, or JAR files containing dependent
classes or other components required by the application. Enterprise applications
are called EAR files because enterprise application projects are stored
in enterprise archive (EAR) files.
Before you begin
This topic assumes that you have created and unit tested code artifacts
that you want to assemble in an
enterprise
application and deploy onto an application server. A deployable enterprise
application can consist of the following code artifacts:
About this task
Before you can deploy your archive files onto an application server,
you must assemble them in a
J2EE enterprise
application. This topic describes how to create an enterprise application
archive (EAR) file using the Application Server Toolkit, Rational Application
Developer or Rational Web Developer
assembly tools.
Creating an enterprise application
in an assembly tool consists of the following:
- Creating an enterprise application project.
- Adding (importing) archive files such as Web application archives (WAR),
resource adapter archives (RAR), enterprise bean (EJB) JAR files, and application
client archives (JAR) files.
Procedure
- Start an assembly tool.
- If you have not done so already, configure the assembly tool for work on J2EE modules.
- Click File > New > Project > J2EE > Enterprise Application Project
> Next. Or, if you have created an enterprise application project before,
click File > New > Enterprise Application Project.
- In the New Enterprise Application Project dialog, create an enterprise
application project:
- Specify an EAR file name and location.
- To change the default project location, click Browse and
specify a new location.
- Click Show Advanced to display hidden settings.
- Specify whether you want an EAR file that supports J2EE 1.2,
1.3 or 1.4.
- Select a target server. Select the WebSphere
Application Server v6.0 target server to use services such as the following:
- Click Next.
- On the EAR Module Projects page, select the existing modules
that you want to add to the new enterprise application project. To
create new modules for this enterprise application:
- Click New Module.
- On the New Module Project page, select Create default module projects to
create modules for application client, enterprise bean (EJB), Web or connector
projects. You can use the default project names for the modules or specify
different project names. If you clear the Create default module projects check
box, you can select a single module type and proceed with the proper wizard
for that project type.
- Click Finish to create the project modules and add their names
to the list of available modules on the EAR Module Projects page.
- Click Finish.
Results
Files for the enterprise application are shown in the Project Explorer
view under Enterprise Application.
What to do next
Verify the contents of the new enterprise application in either of
the following ways:
- In the Project Explorer view, expand Enterprise Application and
view the new EAR file and its contents.
- Click Window > Show View > Navigator to see the associated files
for the enterprise application in a Navigator view.