Java Enterprise Edition Architecture
Figure 1: Java Enterprise Edition Architecture
JEE implements the Presentation Layer with Servlets and JavaServer Pages (JSP). Servlet and JSP generate web pages with dynamic content (typically originating from the database). They also parse web pages submitted from the client and pass them to Enterprise JavaBeans for handling. Servlets and JSPs run inside a Web Server.
JEE implements the Business Logic layer with Enterprise JavaBeans (EJBs). EJBs are responsible for logic like validation and calculations as well as provided data access (e.g. database I/O) for the application. Enterprise JavaBeans run inside an Application Sever.
Under JEE, EJBs access a database through one of two means:
using a JDBC interface which requires a lower level of coding and/or
using SQLJ which provides a higher level interface to the database
In addition to these components for web application, JEE provides for access by non-web clients to the business logic layer. A standalone Java application (IIOP client) can access an EJB directly using JEE’s Remote Method Invocation (RMI) API.