Java Persistence/Persistence Products

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search

There are many persistence products to choose from. Most persistence products now support a JPA interface, although there still are some exceptions. Which product you use depends on your preference, but most people would recommend you use the JPA standard whichever product you choose. This gives you the flexibility to switch persistence providers, or port your application to another server platform which may use a different persistence provider.

Determining which persistence product to use involves many criteria. Valid things to consider include:

  • Which persistence product does your server platform support and integrate with?
  • What is the cost of the product, is it free and open source, can you purchase enterprise level support and services?
  • Do you have an existing relationship with the company producing the product?
  • Is the product active and does it have a large user base?
  • How does the product perform and scale?
  • Does the product integrate with your database platform?
  • Does the product have active and open forums, do questions receive useful responses?
  • Is the product JPA compliant, what functionality does the product offer beyond the JPA specification?

[edit] Existing Persistence Products

The following table summaries existing persistence products.[1]

Product JPA 1.0 JDO 2.0 CMP 2.1 Version Year of Last Release Open Source Application Servers[2] Forum Posts per Month[3]
Hibernate (Red Hat) Yes
3.3.1
2008
Yes JBoss 650
EclipseLink (Eclipse) Yes
1.0.2
2008
Yes OracleAS (11g), Oracle Weblogic (10.3), Glassfish (v3) 81
TopLink (Oracle) Yes Yes
11g
2008
OracleAS (11g), Oracle Weblogic (10.3) 80
OpenJPA (Apache) Yes
1.0.3
2008
Yes Geronimo 60
DataNucleus (DataNucleus) Yes Yes
1.1.5
2009
Yes Not published
TopLink Essentials (java.net) Yes
2.0
2007
Yes Glassfish (v2), SunAS (9), OracleAS (10.1.3) 13
Kodo (Oracle) Yes Yes
4.1
2007
Oracle WebLogic (10.3) 0
  1. Last updated 2008-10
  2. Application server that includes the product as their JPA implementation
  3. Number of user forum posts for 2008-10. Note this is only an estimate of community size and may be misleading due to several factors including users of open source products are more likely to post to forums, where as users of commercial products are more likely to use support. The estimate is also confused by the fact that some users post questions to generic EJB, JPA or ORM forums.