What Does What?

The JavaTM2 Enterprise Edition (J2EE) platform is an n-tier platform. Each tier has a specific role and is defined in the following paragraphs:

Clients

Clients are the end-users of the system and can access the J2EETM server by several means. One of the most common is to use a Web browser like Netscape or Internet Explorer and connect to a Web server where Java Servlets or Java Server Pages (JSP) access the business logic of the J2EETM server (see the figure J2EE n-tier architecture overview). Another solution, is to use a specific Java program that directly communicates with the J2EETM server (see the figure Accessing the JOnAS server business logic from a Java client).

Web server

The Web server is responsible for accepting client requests and sending HTML replies back to the client. HTML pages can be static files that reside on the Web server filesystem or dynamically built with Servlets or JSP from data generated by the beans.

Servlet/JSP server

The Java Server Page (JSP) server or Servlet container can be integrated into the Web server or be a separate entity communicating with the Web server. JSP or servlets run within a Java Virtual Machine that can be the same as the one used by the J2EETM server.

J2EETM application server

The J2EETM application server is the place where the beans are executed. JOnAS is fully implemented in Java and all the beans loaded in an instance of JOnAS run within the same Java Virtual Machine. It is possible to run several different JOnAS J2EETM application servers on the same or separate machines.

Database server

The database server is used to store and retrieve data. It is accessed through the standard JDBCTM API by the beans.

Figure 1: Accessing the JOnAS server business logic from a Java client

Figure 2: J2EE n-tier architecture overview

The distributed environment in the EJB world uses RMI but JOnAS supports several distributed processing environments: