问题
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