JPA 2.0 Implementations comparison : Hibernate 3.5 vs EclipseLink 2 vs OpenJPA 2

会有一股神秘感。 提交于 2020-01-01 04:51:07

问题


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.


回答1:


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 ).




回答2:


I'd say it depends on your application. If you age going to use a lot of Oracle-related features (like, you need hints in your SQL or hierarchical queries or so on), EclipseLink is more suitable for you. In other case pick up Hibernate. More details you can find at http://simpletoad.blogspot.com/2012/11/what-u-must-know-about-eclipselink-orm.html BTW, don't care about performance benchmarking there ORM - if performance is critial for - don't use ORM at all



来源:https://stackoverflow.com/questions/3035308/jpa-2-0-implementations-comparison-hibernate-3-5-vs-eclipselink-2-vs-openjpa-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!