views:

579

answers:

2

It seems like EclipseLink has been chosen by sun as the reference implementation of JPA 2.0, nevertheless I see lots of people continue to use hibernate...

I have no experience with any of them, so I wonder which one should I choose for a new project...

I'd like to know the pros / cons of each one...

thanks a lot

ps: btw, and this is part of the answer, there are 3636 questions on stackoverflow about hibernate, and only 68 about eclipselink...

+5  A: 

Hibernate is more popular. It will be easier for you to find help and answers with it because of this. Hibernate came well before JPA.

EclipseLink is, as you say, the reference implementation of JPA 2.0. That counts for something. Also it seems EclipseLink can do some useful things that Hibernate has no equivalent for (batch queries spring to mind).

I used EclipseLink quite a bit and found it to be pretty good with better documentation than Hibernate.

Ultimately however there is no wrong choice here.

cletus
Not sure this is a direct equivalent but Hibernate has a `@org.hibernate.annotations.BatchSize` annotation (yeah, it's an extension).
Pascal Thivent
+6  A: 

I'd like to know the pros / cons of each one

  • Both fully support JSR-317 (JPA 2.0) now.
  • Hibernate is definitely the JPA provider with the largest community and is widely used/tested.
  • EclipseLink requires a bytecode enhancement step (while Hibernate uses dynamic proxies).
  • I'm pretty sure they both have features for which the other doesn't have equivalent.
  • Both have specific extensions that you may find interesting if you don't mind making your app less portable.
  • You should bench your application with both of them.
Pascal Thivent