Multi-layer model
The J2EE platform provides a multi-layer application model that means that different parts of the application can run on different devices. The J2EE structure defines a guestrian layer, an intermediate layer (consisting of one or more sub-layers), and an EIS layer.
Client layer: Supports a wide variety of client types, which can be within or outside of the company's firewall.
Intermediate layer: Support client services through the web container in the Web layer, providing various services to business components through Enterprise JavaBeans containers in the EJB layer.
Enterprise Information System (EIS): Use the standard API to support access to enterprise information systems.
2. Component management based on containers
J2EE provides the concept of a central container based on component development models, and the container provides the runtime environment of component services. Components can expect their services to be valid on any J2EE platform, for example, all J2EE Web containers Provide runtime support so that the result is returned to the passenger aircraft, the process is performed (for example, calling JSP or servlet) and returns the result to the client. All EJB containers provide automatic support for transaction and lifecycle management of EJB components, and supports search or other services to EJB. The container also provides standardized access to the enterprise information system, for example, providing access to the relational database management system through the JDBC API.
In addition, the container provides a mechanism for setting application behavior during assembly or deployment, by using deployment descriptors (a text file, using XML tag, specifying the behavior of the component), in deployment (instead of component code), Components can be replenished to a specific container environment, which can be configured during deployment, including security check, transaction control, and other management responsibilities.
3. Support for client components
J2EE's client floor provides a wide range of customer-type support, which can be within the enterprise firewall. Clients can be provided through a web browser, the browser may be using an unformatted HTML page, or a dynamic HTML page generated by JSP (JavaServer Page), or Java Applet. Sing-alone's Java application can also be used as a client. J2EE customers can assume that the intermediate layer is mainly used primarily using the web standard (ie HTTP, HTML, and XML).
In order to support more complex user interactions, you may need to provide some features directly on the client layer, which is usually implemented in a Java bean component, using servlet and intermediate-level service interaction. The Java Bean component of the client layer is usually provided as an applet, which is automatically downloaded to the user's browser. In order to reduce the problem caused by old versions of the old version or non-standard Java virtual machine in the user browser, the J2EE application model provides specialized support for the Java plugin that automatically downloads and installed.
The BEAN of the client layer may also be included in a stand-alone application client written in a Java language. In this case, companies usually use different operating system installations, users can use their browsers to download, then User performs the installer, access service. Since the Java program can be ported to all platforms, the service only needs to maintain a version of the client program. While doing the drill program itself is possible, the installer on the Java client is usually related to the operating system, and several business tools can automatically generate these installations related to the operating system.
Non-Java clients (for example, Visual Basic programs) can present J2EE services to users. In the middle layer, servlet presented to the first layer client service is a standard HTTP protocol, so almost all programs running on any operating system can easily access it. 4. Support for business logic components
In the J2EE platform, the EJB component implements the business logic of the intermediate layer, EJB makes the developers of the component or application will focus on commercial logic development, and make complex services (such as: security, transactions) to the EJB server.
The J2EE platform and EJB structures are complementary. The EJB component model is the central, J2EE platform supports EJB specification in two ways:
(1) Provide an API that can be used to implement EJB to the EJB developer.
(2) Define a more powerful, distributed programming environment, in which EJB is used as commercial logic components.
5. Support for J2EE standards
The J2EE standard defines a series of relevant specifications, which are mainly J2EE platform specifications, Enterprise JavaBeans specification, Java Servlet specification, and Java Server Page specification, and J2EE Compatibility Test Suite (J2EE Compatibility Test Suite, CTS) and J2EE SDK .
The J2EE Compatibility Test Suite helps the application's portability maximization by verifying the performance of the J2EE platform product, which starts from the basic JCK (Java Conformance Kit), and the CTS test JCK does not involve the Java standard extension. The abread situation of the API and tests the ability of the J2EE platform to run standards, end-to-end applications.
J2EE SDK hopes to implement several goals: it provides an operational definition of the J2EE platform; software providers can use them as a standard to determine how their products must be under specific application environments; it can be Developers are used to verify the portability of the application; J2EE SDK can also be used with standard platforms running J2EE compatible test suite.