Java EE Architecture-a Brief introduction

Source: Internet
Author: User
Tags sessions

Java EE, the JAVA2 Platform Enterprise Edition, provides a component-based way to design, develop, assemble, and deploy enterprise applications. Java EE uses a multi-tier distributed Application model, which is typically implemented through three or four layers :

1, the customer layer, running the components on the client computer.
2, the WEB layer, running on the Java EE server components.
3, the business layer, is also running on the Java server components.
4, Enterprise Information System layer (EIS), refers to running on the EIS Server software system.

The above level generally refers to the three-tier application, which is distributed in three different locations: client computers, Java EE servers and background databases or legacy systems in the past. Please see the legend:

Java EE component

The Java EE application is composed of components. The Java EE component is a function-encapsulated software unit that can be composed with some related classes and files to form the Java EE application.
1. Application clients and applets are components that run on a client computer.
2. Components based on Java servlet and JSP technology are called Web Components that run on the server.
3. The Enterprise JavaBean (EJB) component is called the business component and is also run on the server.

Java Client

The Java EE client can be a Web component or an application client.
1. Web Client
Includes two parts, first those dynamic Web pages (HTML, XML, and so on), which run on the web layer, and the other is a Web browser that receives and parses and displays Web pages from the server on the client's browser.
2. Small Application (applet)
Needs to run on a Web browser where the client has a Java virtual machine installed.
3. Application Client
Java EE application clients run on client computers to provide a powerful and flexible user interface, such as a graphical user interface (GUI) created using swing or AWT. The application can directly access the enterprise beans running in the business tier and, if required, open an HTTP connection to establish communication with the servlet running on the Web tier.
4. JavaBean Component Architecture
The JavaBean-based component architecture may also be included in both the server and client tiers to enable data flow through JavaBean, either between the application client or the applet and the components running on the Java EE server, or between the Java server and the background database. (Although the JavaBean component is not included in the Java EE specification)
5, the service of Java-EE communication
The communication between the customer layer and the business layer running on the Java EE server can be direct, or it can be implemented by the servlet and JSP running in the Web layer, in which case the customer runs in the browser.

Web Components

The Web component of Java EE can be a servlet or JSP page. static HTML pages and applets can also be packaged together as Web Components during application assembly, but this is not a Web component approved by the Java EE specification.

Business components

Business code refers to the logic that is executed by the Enterprise Bean (EJB) at the business level that solves or satisfies some requirements in a particular business domain. There are three different types of enterprise beans: Session beans, Entity beans, and message-driven beans. The session Bean represents a short session of the customer, and the session bean and the data it contains disappear when the customer finishes execution. An entity bean represents a persistent data, a row of records stored in a database table, even if the customer terminates or the server shuts down, the service at the bottom of the Java EE ensures that the data for the entity bean is saved.

Enterprise Information System Layer

The Enterprise Information System layer processes the enterprise information system software, including the enterprise organization structure system, for example Enterprise Resource Plan (ERP), the large-scale transaction processing, the database system and other historical legacy information System.

Summarize several concepts:

EJB

Enterprise JavaBean, a component architecture for developing and deploying object-oriented, distributed, enterprise-class applications. The applications that are developed use an EJB architecture to achieve scalability and manage transactions and security.
The EJB includes a session bean, an entity bean (entity Bean), and a message-driven bean (Message-driven bean). The session bean is divided into stateless session beans (stateless sessions beans) and stateful session beans (stateful sessions beans). Entity beans are also divided into bean management entity beans and container management entity beans. Since this bean corresponds to the records in the database, any changes to the database records are also synchronized to the related beans in the component pool, a process called persistence (persistenced), which is the most important feature of the entity bean. This is divided into container management persistence (container-managed persistence,cmp) and Bean management persistence (bean-managed persistence,bmp), depending on how the persistence operates.

Container

Container, an entity that manages the lifecycle, security, deployment, and run-time services of a component. Each type of container provides only services related to the corresponding type of component, such as EJB, Web, JSP, applet, and application client. Where both the EJB container and the Web container are running on the Java server.

J2ee

Java 2 Platform Enterprise Edition,java 2 Platform Enterprise Edition. is a platform or environment for developing and deploying enterprise applications. It consists of a range of services, application programming interfaces (APIs), functional protocols that provide multi-tier development, and web-based applications.

Related Article

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.