JPA Implementations - Which one is the best to use? [closed]

微笑、不失礼 提交于 2019-11-27 20:02:46
Clint

I had the same conclusions about these implementations.

  1. OpenJPA was/seemed buggy

  2. Hibernate had tons of libraries and seemed to have trouble with not lazy loading everything.

  3. Toplink ended up as my choice. It was not as flexible as Hibernate would have been but it works and I don't have to install commons-logging.

The one I would try next is JPOX, which has recently been renamed to datanucleus.

Personally I don't feel OpenJPA is mature enough yet. There are other open source libraries that are more mature and I would rather use those. These are the ones I would consider in order:

  1. Hibernate. Hibernate has been around for a long time and has really paved the way for ORM in Java. The only issue I have with Hibernate is the licensing. It is LGPL licensed which may cause some commercial companies to squirm (for reasons I won't go into here). Anyway, if LGPL is an issue for you, it is probably good to steer clear.

  2. EclipseLink. Some background on eclipselink. Toplink Essentials was Oracle's free version of their JPA implementation. EclipseLink was taken from Toplink, Oracle's full blown JPA implementation. EclipseLink is going to be the JPA 2.0 provider for Glassfish v3.0 so it looks like everything is moving away from Toplink Essentials and to EclipseLink. Although the EclipseLink version is only 1.0.2, the product has been around for a long time under other names.

A project I'm working on is on Toplink Essentials right now but we plan to switch to Eclipselink shortly. Hibernate was out for the licensing issues I mentioned earlier.

OpenJPA is known as Kodo, which is what BEA bought quite long ago. Kodo was implementation of JDO and now JPA. Also, we use OpenJPA quite intensively. Thus, I woudn't say that it's not mature. It's fine However I would suggest to use Hibernate, namely, JPA wrappers around Hibernate.

Reason? 1) JPA is very, very similar to Hibernate 2) Many job positions has Hibernate requirement. It's better to lean to mainstream products...basically

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