hibernate和其他框架或规范有什么不同/相似之处? [英] Which are the differences/similarities between hibernate and other frameworks or specifications?

查看:106
本文介绍了hibernate和其他框架或规范有什么不同/相似之处?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我不清楚Hibernate是否实现了Java EE 5持久性实现,或者我不清楚Hibernate是实现Java EE 5持久性实现还是Java EE 5持久性实现。如果它是一种完全不同于后端系统的数据表示方法。



我对Hibernate及其与Java中给出的关于java持久性的概念之间的关系感到困惑EE 5教程...您能否阐明Hibernate在实体和EJB上下文中的角色?

另外,我想知道其他方法(框架),比如JPA或Spring ...

解决方案


我想知道Hibernate和简单持久性之间的差异/相似之处Java EE 5?

Java EE 5的标准化持久性 API 是JPA 1.0,是一种统一版本的EJB 2 CMP,JDO,Hibernate和TopLink API和产品。 Hibernate是一个ORM框架,它早于JPA,并严重影响了JPA的规范(Hibernate的创建者是JPA背后专家组的成员)。请记住,JPA只是一个API,您需要一个JPA的实现才能使用它。


我不清楚Hibernate是否实现了Java EE 5持久化实现,或者它是否与后端系统完全不同的数据表示方法。


是的,Hibernate通过Hibernate EntityManager项目(依赖于Hibernate Core)提供了JPA的实现(也扩展了它,Hibernate是JPA的超集)。 。


我对Hibernate及其与Java EE 5教程中给出的有关Java持久性的概念之间的关系感到困惑......你能澄清Hibernate在实体和EJB上下文中的角色?

Hibernate可以用作JPA持久性提供者,也就是说,的实际持久化EJB 3实体的代码(JPA规范是版本中的EJB 3.0规范的一部分1.0,它现在是一个单独的规范)

lockquote

另外,我想知道其他方法(框架),如JPA或Spring ... Spring不是一个持久化框架,Spring是一个IoC容器,它不与Hibernate竞争。

符合JPA标准的Hibernate替代品包括TopLink Essentials(Java EE 5中的RI),EclipseLink(也是Java EE 6中JPA 2.0的RI),OpenJPA, DataNucleus。
$ b

持久化的其他选项包括JDO(另一种标准化的持久化API),iBATIS(不是ORM,更多是数据映射器),JDBC(低级API)举报最有名的。

检查此上一个答案

a>概述和一些历史背景。


I want to know the differences/similarities between Hibernate and simple persistence in Java EE 5?

I'm not clear if Hibernate implements Java EE 5 persistence implementation or if it is a totally different approach to data representation over back-end systems.

I'm confused about Hibernate and its relation with the concepts about java persistence given in the Java EE 5 tutorial... could you clarify the role of Hibernate in the context of Entities and EJBs?

Also, I want to know other approaches (frameworks) like JPA or Spring...

解决方案

I want to know the differences/similarities between Hibernate and simple persistence in Java EE 5?

The standardized persistence API of Java EE 5 is JPA 1.0 and is a kind of unified version of EJB 2 CMP, JDO, Hibernate, and TopLink APIs and products. Hibernate is an ORM framework that predates JPA and has heavily influenced the specification of JPA (the creator of Hibernate is a member of the expert group behind JPA). Just keep in mind that JPA is just an API, you need an implementation of JPA to use it.

I'm not clear if Hibernate implements Java EE 5 persistence implementation or if it is a totally different approach to data representation over back-end systems.

Yes, Hibernate provides an implementation of JPA (and also extends it, Hibernate is a superset of JPA) via the Hibernate EntityManager project (that relies on Hibernate Core).

I'm confused about Hibernate and its relation with the concepts about java persistence given in the Java EE 5 tutorial... could you clarify the role of Hibernate in the context of Entities and EJBs?

Hibernate can be used as the JPA persistence provider, i.e. as the piece of code that actually persists EJB 3 entities (the JPA specification was part of EJB 3.0 specification in version 1.0, it's now a separate spec)

Also, I want to know other approaches (frameworks) like JPA or Spring...

Spring is not a persistence framework, Spring is an IoC container, it doesn't compete with Hibernate.

JPA compliant alternatives to Hibernate include TopLink Essentials (the RI in Java EE 5), EclipseLink (which is also the RI of JPA 2.0 in Java EE 6), OpenJPA, DataNucleus.

Other options for persistence include JDO (another standardized persistence API), iBATIS (not an ORM, it's more a data mapper), JDBC (low level API) to cite the most famous.

Check this previous answer for an overview and some historical background.

这篇关于hibernate和其他框架或规范有什么不同/相似之处?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆