Analysis on Persistent Object Technology of EJB-JSP tutorial, object-oriented/Design

Source: Internet
Author: User

From changjiu College
The problem of ing between table-based relational databases and tree-type Java objects is an issue that is constantly debated. Fortunately, there are already some good solutions. In this article, we will introduce how the EJB technology solves this problem in a specific way.
As long as it involves saving and querying information, most applications need to deal with relational databases. However, due to the essential difference between the structure of relational databases and Java objects, the ing between them is a headache for Java developers. Relational databases store data in tables, while Java objects store data in a tree. This type of mismatch leads to a variety of Object Persistence solutions to narrow the gap between the relational world and the object world. The EJB framework is one of these solutions.
Object Persistence
Currently, there are many different tools that allow developers to convert JAVA objects to fields or records in the database, or restore fields or records in the database to JAVA objects. These operations involve serialization of tree-type JAVA objects to the database, and vice versa. The core of this work is how to complete the work with minimum performance loss.
The EJB framework provides such an object persistence mechanism. We will discuss this mechanism in this article, but first we will give a comprehensive understanding of the EJB architecture.
Enterprise-level JavaBeans (EJB)
The EJB technology can be defined as follows: it is a reusable component framework provided for distributed applications based on the JAVA Server. All business logic, deployment definition, and Object persistence are managed by this framework. The EJB framework has the following features:
· EJB is a JAVA object running in the server environment.
· EJB can be remotely accessed on different machines, but it is as convenient to call ejbs as to call local JavaBean.
· The EJB container manages ejbs in a unified manner.
Although the names of enterprise-level JavaBean are similar to those of ordinary JavaBean, they are essentially different in design. To make you more aware of this, we 'd better first understand the basic concepts of EJB, several EJB component modes, and their configuration environment.
EJB running environment
In essence, EJB only implements common JAVA objects for specific interfaces, but this object must run in a specific environment: EJB container. If you leave the EJB container, EJB cannot run. The relationship between ejbs and EJB containers is sometimes called "reverse call"

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.