Who do what ?

The JavaTM2 Enterprise Edition (J2EE) platform is a n-tier platform. Each tier has a specific role that we try to define hereafter:

Clients. Clients are the end-users of the system and can access the EJB 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 EJB server (see Figure 2). Another solution, is to use a specific Java programs that directly communicates with the EJB server (see Figure 1).

Web server. The Web server is responsible for accepting client requests and sending HTML replies back. HTML pages can be static files that resides 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 in the Web server or be a separate entity communicating with the Web server. JSP or servlets run within a Java Virtual Machine that can eventually be the same as the one used by the EJB server. This last case is not supported in JOnAS version 2.4.

EJB server. The EJB 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 EJB servers on the same or separate machines (see the section called Running multiple JOnAS servers in the chapter called Getting started with JOnAS).

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

Figure 1. Accessing EJB server business logic from a Java client

Figure 2. J2EE n-tier architecture overview

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