Relationship between JPA and ejb3

Source: Internet
Author: User

: http://blog.csdn.net/zhaoqianjava/article/details/6924672

JPAIs based onJavaPersistence Solution, mainly to solveORMFramework differences, which can solve the current problems to some extentORMFor developersJPAStandard for system development.

 

JPAFull nameJava persistence API,JavaPersistenceAPIYesSunCompany inJava ee 5TheJavaPersistence interface.JPAAccording to the currentJavaThe advantage of persistence technology is designed to standardize and simplifyJavaObject persistence.

1.3DescriptionJPARole in system architecture, useJPAPersistence object, instead of relying on a certainORMFramework.

Advantages of JPA

 

In fact,JPAIt is not a technology, but a standard, becauseJPAIt's just a set of interfaces and cannot do anything.JPAOnly standardizedJavaOfficial persistence standards.JPAIt has the following advantages.

persistence JAVA object. JPA directly persists complex JAVA object, and can use the jpql language for complex queries. jpql is JPA is a query language similar to SQL is an Object-Oriented Query Language.

easy to use. JPA Use annotations ( annotation ) defines the ing between JAVA objects and relational databases, traditional ORM uses XML configuration file. JPA compared with ORM is convenient. Use JPA to ignore the databases used at the underlying layer.

Standardized.JPAYesJCPReleased by the Organization, yesJavaUnified according to official regulationsAPI. There are already multiple frameworks to implementJPAStandard. UsedJPASystem can choose to followJPAStandard frame and free replacement.

Transaction and large data volume.JPAThe underlying layer uses relational databases for storage, so it has the characteristics of relational databases, such as transaction, data integrity, concurrent access, and large data volumes.

Compared with other Persistence Technologies,JPAIt has great technical advantages. The table listsJPAComparison with other Persistence Technologies.

 


 

Relationship between ejb3 and JPA

For historical reasons, EJB 3 And JPA It has a broken connection. EJB 2.x Medium, EJB There are three types Bean Session Bean ( Session Bean ), Entity Bean ( Entity Bean ) And message-driven Bean ( Message Driven Bean ).

With the launch of the ejb3 specification, the Entity Bean (enity bean) in EJB is gradually replaced by the JPA specification, which is why the JPA specification is included in the ejb3 specification.

However, JPA can be used not only in the EJB environment, but also in the j2se environment. It is more widely used than the ejb2.x Entity Bean.

In short, although JPA is from ejb3, it is used in a range greater than ejb3, not only in javaee5, but also in the javase environment, the relationship between ejb3 and JPA.

 

 

multiple ORM open source framework support JPA , such as hibernate , toplink , openjpa .

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.