The Java™ 2 Platform, Enterprise Edition (J2EE) provides a standard for developing multitier, enterprise services.
The economy and technology of today have intensified the need for faster, more efficient, and larger-scale information management solutions. The J2EE specification satisfies these challenges by providing a programming model that improves development productivity, standardizes the platform for hosting enterprise applications, and ensures portability of developed applications with an extensive test suite.
J2EE architecture supports component-based development of multi-tier enterprise applications. A J2EE application system typically includes the following tiers:
- Client tier: In the client tier, Web components, such as Servlets and JavaServer Pages (JSPs), or standalone Java applications provide a dynamic interface to the middle tier.
- Middle tier: In the server tier, or middle tier, enterprise beans and Web Services encapsulate reusable, distributable business logic for the application. These server-tier components are contained on a J2EE Application Server, which provides the platform for these components to perform actions and store data.
- Enterprise data tier: In the data tier, the enterprise's data is stored and persisted, typically in a relational database.
J2EE applications are comprised of components, containers, and services. Components are application-level components. Web components, such as Servlets and JSPs, provide dynamic responses to requests from a Web page. EJB components contain server-side business logic for enterprise applications. Web and EJB component containers host services that support Web and EJB modules.
J2EE implements the Presentation Layer with Servlets and, more recently, Java provides the option to generate webpages with dynamic content using JavaServer Pages (JSP). Servlets/JSP generate webpages with dynamic content (typically originating from the database). They also parse webpages submitted from the client and pass them to Enterprise JavaBeans for handling. Servlets and JSPs run inside a Web Server.
J2EE implements the Business Logic layer with Enterprise JavaBeans (EJB). Enterprise JavaBeans 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 J2EE, 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, J2EE provides for access by non-web clients to the business logic layer. A standalone Java application (IIOP client) can access an EJB directly using J2EE's Remote Method Invocation (RMI) API.