The structure of Java EE

Source: Internet
Author: User

This component-based, platform-independent Java EE structure makes the Java EE program written very simple, because the business logic is encapsulated into reusable components, and the Java-EE server in the form of containers for all component types to provide background services. Because you don't have to develop this service yourself, So you can concentrate on solving the business problems at hand.

Containers and Services:

Container settings Customize the internal support provided by the Java server, including security, transaction Management, JNDI (javanaminganddirectoryinterface) addressing, remote connectivity, and other services, to the following list of the most important services:

The Java EE security model allows you to configure Web Components or Enterprisebean so that only authorized users can access system resources. Each customer belongs to a particular role, and each role only allows specific methods to be activated. You should declare roles and methods that can be activated in the Enterprisebean layout description. Because of this declarative approach, you do not have to write rules to enforce security.

The Java EE Transaction Management (transactionmanagement) model lets you specify the relationships between all the methods in a transaction, All the methods in such a transaction are treated as a single unit. When the client activates a Enterprisebean method, the container is involved in a management transaction. There is no need to encode the bounds of a transaction in Enterprisebean because of a container-managed transaction. Code that requires control over distributed transactions can be very complex. Instead of writing and debugging complex code, you simply declare enterprisebean transaction attributes in the layout description file. The container will read this file and handle this Enterprisebean transaction for you.

The Jndi Addressing (jndilookup) service provides a unified interface for multiple names and directory services within an enterprise so that application components can access the name and directory services.

Java EE remote Connection (remoteclientconnectivity) model manages low-level interactions between clients and Enterprisebean. When a enterprisebean is created, A client can call it as if it is on the same virtual machine as the client.

The Life cycle Management (Lifecyclemanagement) model manages the creation and removal of Enterprisebean, and a enterprisebean will go through several states in its life cycle. The container creates the Enterprisebean and moves him in the available instance pool and the active state, and eventually removes it from the container. Even if you can call the Enterprisebean create and remove methods, the container will perform these tasks in the background.

The database connection pool (databaseconnectionpooling) model is a valuable resource. Getting a database connection is a time-consuming task, and the number of connections is very limited. Containers mitigate these problems by managing connection pooling. Enterprisebean can quickly get connections from the pool. Can be used for other beans when the bean releases the connection.

Container type

The Java EE application component can be installed and deployed in the following containers:

The EJB container manages the execution of enterprise-level beans in all Java EE applications. Enterprisebean and their containers run on the Java server.

The Web container manages the execution of JSP pages and servlet components in all Java EE applications. Web Components and their containers run on the Java server.

The application client container manages the execution of application client components in all Java EE applications. Application clients and their containers run on the Java server.

The applet container is a combination of a Web browser and a Java plug-in running on the client machine.

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.