JPA--java EE 5.0 ORM Specification

Source: Internet
Author: User
Tags java se

JPA Overview

The JPA (Java Persistence API) is the standard ORM specification for the Java EE 5.0 platform and will be supported by all Java EE servers. By absorbing the experience of the previous EJB spec failure, Sun has gained an easy-to-use, scalable ORM specification based on the full absorption of the existing ORM framework. In response to the current development community, JPA has been greatly supported and praised, and the goal of JPA as an ORM standardization integrator should not be difficult to achieve.

JPA uses JDK 5.0 annotations or XML to describe the mapping relationships of object-relational tables, and to persist the entity objects of the runtime to the database, Figure 1 describes the JPA structure well:

Sun introduced the new JPA ORM specification for two reasons: first, simplifying the development of object persistence for existing Java EE and Java SE applications; second, Sun wants to integrate the ORM technology to achieve the world.

JPA is developed by the EJB 3.0 software Expert Group as part of the JSR-220 implementation. But it's not confined to EJB 3.0, and you can use it in Web apps and even desktop applications. JPA's purpose is to provide POJO standard specification, this shows that after years of practical exploration, can be separated from the container operation, easy to develop and test the concept has been deeply rooted. Currently hibernate 3.2, TopLink 10.1.3 and OPENJPA provide JPA implementations.

JPA's overall thinking is broadly consistent with the existing ORM frameworks such as Hibernate, Toplink,jdo, and so on. In general, JPA includes the following 3 areas of technology:

ORM mapping metadata, JPA supports XML and JDK 5.0 annotations in the form of metadata describing the mapping between objects and tables, and the framework for persisting entity objects to database tables;

The JPA API, which is used to manipulate entity objects, perform crud operations, and the framework completes everything for us in the background, freeing developers from cumbersome JDBC and SQL code.

Query language, which is an important aspect of the persistence operation, is to query the data by object-oriented rather than database-oriented query language, so that the SQL statements of the program are tightly coupled.

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.