Create enterprise applications
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 EAR files.
Before you begin
This article 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:
- Enterprise beans
- Servlets, JavaServer Pages (JSP) files and other Web components
- Resource adapter (connector) implementations
- Application clients
- Other supporting classes and files
Overview
Before one can deploy your archive files onto an application server, assemble them in a J2EE enterprise application. This article describes how to create an enterprise application archive (EAR) file using the Application Server Toolkit 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 WAS 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. Use the default project names for the modules or specify different project names. If you clear the Create default module projects check box, one 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.
Result
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.
See Also
Web applications
Enterprise (J2EE) applications
Related Tasks
Assembling applications
Related Information
Import WAR files
Import client applications
Import EJB files
Developing and testing a complete J2EE "Hello World" application with WebSphere Studio V5
Developing and Deploying an End-to-end J2EE Application to JBoss Application Server using WebSphere Studio V5