J2EE architecture-J2EE

Source: Internet
Author: User

J2EE is the Enterprise Edition of Java2 Platform (Java 2 Platform, Enterprise Edition). Its core is a set of technical specifications and guidelines, it provides a component-based approach to design, develop, assemble, and deploy enterprise applications. J2EE uses a multi-layer distributed application model.

J2EE hierarchy: A component running on the client computer. The interface logic between the user and the system is used to access the application server through the http protocol.
Presentation Layer: components running on the J2EE server. by interacting with the business logic layer, You can output the data you need in an appropriate way.
The business logic layer is also a component running on the J2EE server.
An enterprise information system layer (EIS) is a software system running on an EIS server.

The above layers generally refer to three layers of applications, namely the customer layer + J2EE application service layer + enterprise information system layer, which are distributed in three different locations: customers' computers, J2EE servers, and back-end databases or legacy systems.


Customer Web Browser

The Web Client displays the webpage transmitted from the server in standard format. The webpage is already in HTML or XML format when it is passed to the browser, and the browser correctly displays the webpage to the user.


Applet)

It is a lightweight client embedded in a browser. It is used only when the web page cannot fully express data or the application interface. Applet is a method to replace the web page, the program can be developed using J2SE, And the Applet cannot use various services and APIs in J2EE. You need to run on the Web browser where the Java Virtual Machine is installed on the client.


Compared with Applet, the application client J2EE application client is a heavyweight client that can use most services and APIs and runs on the client, provides powerful, flexible, and easy-to-use user interfaces, such as graphical user interfaces (guis) created using Swing or AWT ). Of course, the application can directly access the Bean running on the business layer. If required, you can also open an HTTP connection to establish communication with the Servlet running on the Web layer.
 
Two major containers of J2EE Application Server

EJB container + Web Container, that is, business logic layer + presentation layer


Web Container

Manage the running of some Web components such as servlets and provide runtime support for responding to customer requests and returned results.


EJB container:Responsible for running all ejbs, supporting the processing and lifecycle management of EJB components, Bean search and other services, and supporting the infrastructure of J2EE multi-layer architecture, it is a runtime environment that controls business implementation and provides transaction services, persistence, security, and other important system services, so that developers do not have to develop basic services and focus on the implementation of business logic.
Two major components

Web Components + Ejb components


Web Components

Interacts with Web-based clients. J2EE has three types of Web Components: Servlet, JSP, and JavaBean. Servlet is a function extension of the Web server. It accepts Web requests and returns dynamic Web pages. Components in Web containers can use components in EJB to complete complex business logic. It is worth noting that static HTML pages and Applets are not Web layer components.


EJB componentsThree different types of ejbs are available: Session Bean, message-driven Bean, and Entity Bean.
1. Session Bean: Implements and controls business logic, communicates with the Web layer, and provides interfaces for the Web layer to access business data. When the client completes the execution process, the Session Bean and related data will disappear.
2. Entity Bean: indicates persistent data. Data is stored in a database table. It stores business data and provides Session Bean access to business data.

Third: Message-driven Bean: used to receive and process messages sent by customers through JMS, allowing service components to receive JMS messages from clothes.


The enterprise information system layer is responsible for running enterprise information system software, including ERP, databases, directory services, and other legacy systems.
Summary The various components, service architecture, and technical layers contained in J2EE have common standards and specifications, so that there is good compatibility between various platforms that follow the J2EE architecture, in the past, information products used by the backend of an enterprise were not compatible with each other, and they were difficult to communicate with each other inside or outside the enterprise.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.