JPA 2.0实现比较:Hibernate 3.5 vs EclipseLink 2与OpenJPA 2 [英] JPA 2.0 Implementations comparison : Hibernate 3.5 vs EclipseLink 2 vs OpenJPA 2

查看:105
本文介绍了JPA 2.0实现比较:Hibernate 3.5 vs EclipseLink 2与OpenJPA 2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你有什么选择?你有什么建议和经验?



我正在用Hibernate 3.5和Spring 3.0开发应用程序



优点:




  • 良好的文档资料

  • 简单的配置和有用的日志

  • / li>
  • JPA的一些扩展

  • 一些额外的工具 - JBoss Tools for Eclipse,hbm2ddl,生成静态元模型等等。 b


缺点:


  • 错误! (序列,集合等)

  • 大量的特性与纯粹Hibernate相比增加了一倍。在传统的Hibernate和JPA注解中存在一些混乱。



我正在考虑切换到EclipseLink。你认为什么?



编辑:



我尝试了EclipseLink并有非常糟糕的体验。 EclipseLink似乎需要LoadTimeWeaver,并且喜欢在OSGi平台上运行,而不是简单的Jetty或Tomcat环境。我只是没有时间去处理所有这些配置信息。

解决方案

EclipseLink在没有Weaver的情况下运行得非常好,在Jetty ,Tomcat或OSGi平台。标准下载是一个简单的eclipselink.jar。你是否错误地下载了OSGi包?

Weaver不是必需的,但它会增加一些性能优势,如果您不想将其配置为在Spring中运行,则可以在编译时使用静态编织器 http://wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_%28ELUG%29#To_Configure_Static_Weaving_for_JPA_Entities )。


What's your choice? Do You have any suggestions and experience?

I'm developing an application with Hibernate 3.5 and Spring 3.0

Pros:

  • Good documentation
  • Easy configuration and helpful logs
  • Popularity - wide community
  • Some extensions to JPA
  • Some additional Tools - JBoss Tools for Eclipse, hbm2ddl, generating static metamodel etc...

Cons:

  • Bugs! (Sequences, collections etc...)
  • Lots of reatures are doubled with "pure" Hibernate. There's a mess in legacy Hibernate and JPA annotations.

I'm considering to switch to EclipseLink. What do You think ?

Edit:

I've tried EclipseLink and have very bad experiences. It seems like EclipseLink needs LoadTimeWeaver and likes to run on OSGi platform rather than simple Jetty or Tomcat environment. I just don't have time for all this configuration stuff.

解决方案

EclipseLink runs perfectly fine without the Weaver and equally well in Jetty, Tomcat or an OSGi platform. The standard download is a simple eclipselink.jar. Did you perhaps download the OSGi bundles by mistake?

The Weaver is not required but it will add some performance benefits and if you do no want to configure it to run in Spring you could use the static weaver at compile time ( http://wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_%28ELUG%29#To_Configure_Static_Weaving_for_JPA_Entities ).

这篇关于JPA 2.0实现比较:Hibernate 3.5 vs EclipseLink 2与OpenJPA 2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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