Wonders of the J2EE Architecture
page 9 of 10
by Arindam Ghosh
Average Rating: 
Views (Total / Last 10 Days): 44627/ 49

Application Client Container

Application client container supports application client components. It must provide access to a set of services required by J2EE, but is not required to manage transactions. The application client container is required to provide runtime support for standalone application.

Figure 6



Applet Container

The applet container includes support for the applet-programming model. Typically, a J2SE compatible execution environment acts as a container. The Java plug-in may be added to the browser to obtain such a container.

Web Container

The web container provides the runtime environment for web components (a web component is a Java Servlet or JSP) and services such as security, concurrency, life cycle management, and transaction.

EJB Container

The EJB container manages EJBs at runtime. EJBs reside in the EJB container. This container provides transaction, security and persistence services to the deployed EJBs. The EJB specification establishes the contract between the EJB components and the EJB containers.

J2EE Packaging and Deployment Descriptor Overview

J2EE enables developers to create different parts of their application as reusable components. All related components are grouped together into a module and all modules are grouped into an application. The application is installed and configured to an operational environment. This process is called packaging and deployment.

Packaging is the process of assembling components into modules and modules into an application.

Deployment is the process of installing and customizing an application in an operational environment.

To customize and configure an enterprise application in an operational environment, the server should provide a standard mechanism. J2EE provides facilities to make the packaging and deployment process simple. In J2EE application, the modules and applications are packaged into a Java Archive (JAR) file. The customization of modules and application are defined in XML-based deployment descriptors.

Types of packaging for J2EE Applications

J2EE components can be grouped into the following J2EE modules based on the type of components:

·         EJB module

·         Web module

·         Application client module

An EJB module is a collection of reusable enterprise bean components (session and entity beans). The EJB module is packaged into an EJB JAR file with jar as the extension. This JAR file contains Java classes for enterprise beans, supporting classes and an EJB deployment descriptor.

A web module is a collection of web components and web resources (e.g., servlets and JSP are web components; HTML and images are web resources). Web modules are packaged into Web Archive (WAR) file with war as the extension. This war file contains Servlets and JSP classes, HTML, images, sound files, applets (if any), and a deployment descriptor.

The WAR file format and JAR file format are not the same. Classes in a WAR file are not usually loadable by the class loader if the war file is added to the Java classpath.


An Application client module contains the Java client components. This module is packaged into JAR file with a jar extension. Jar contains Java class that implements the client and application client deployment descriptor.

All the modules discussed above can be grouped into a J2EE application. A J2EE application is packaged using the JAR file format into Enterprise Archive (EAR) file. This file has ear as the extension. This ear file contains one or more J2EE modules and a J2EE application deployment descriptor.

J2EE Deployment Descriptor (DD)

J2EE DD is an XML file describing the environment for modules and their components. Each module in a J2EE application has an associated DD. The J2EE application itself is associated with a DD. DDs can be created either automatically by tools or manually.

The DDs in the different J2EE modules are as given below:

EJB DDs are stored in ejb-jar. xml file

Web DDs are stored in web. xml file

J2EE application DDs are stored in application. xml file

View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-06-17 6:30:19 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search