One or more J2EE components configure the J2EE application. This subsection describes the J2EE applications and J2EE components.
The user application programs such as servlets, JSPs, and Enterprise Beans configure the J2EE application. The J2EE application runs in the J2EE container.
The servlets, JSPs, and Enterprise Beans configuring the J2EE application are called J2EE components.
The following figure shows the relation between the J2EE application and J2EE components:
Figure 2-3 Relation between the J2EE application and J2EE components
A J2EE application has a structure with three layers. The following figure shows the structure of a J2EE application:
Figure 2-4 Structure of a J2EE application
The smallest units of the J2EE application are the files in layer 3 (files enclosed with a dotted line in the figure). Layer 3 includes files such as the class files and JSP files.
The files in layer 2 are the packages of the files in layer 3. For example, in the above figure, the EJB-JAR file in layer 2 is formed by packaging an Enterprise Bean and a DD (ejb-jar.xml) that belong in layer 3.
Furthermore, the respective files packaged in layer 2 form the J2EE application in layer 1.
The packaged files of layer 1 and layer 2 are as follows. The numbers in the figure correspond to the numbers in the following explanation:
Multiple EJB-JARs, Web applications, library JARs, and a single DD (application.xml) configure a J2EE application.
The J2EE application that can be executed on the J2EE server is in archive format and in exploded archive format.
An EJB-JAR is packaged in an EJB-JAR file format. Multiple Enterprise Beans and a single DD (ejb-jar.xml) configure an EJB-JAR. Note that when using annotations in Enterprise Bean, a DD (ejb-jar.xml) is not required.
A Web application is packaged in a WAR file format. Multiple servlets, JSPs, HTML documents, and a single DD (web.xml) configure the Web application.
A library JAR is packaged in a JAR file format. Multiple common libraries configure the Library JAR. A common library is a library where you can use J2EE components in the J2EE application in common. Apart from the files defined under the <module> tag of the DD (application.xml) in the J2EE application, the JAR files with the extension in lower case (.jar) are considered as the library JAR.
In a J2EE application, to use the functionality as an execution platform provided by Application Server, you must execute the application according to the functionality used. Furthermore, Application Server provides a Developer as a product for developing the J2EE application and J2EE components.
For details about how to develop the J2EE applications and J2EE components, see the uCosminexus Application Server Application Development Guide.