This article includes alist of references,related reading, orexternal links,but its sources remain unclear because it lacksinline citations. Please helpimprove this article byintroducing more precise citations.(June 2010) (Learn how and when to remove this message) |
Java Data Objects (JDO) is a specification ofJavaobjectpersistence. One of its features is a transparency of the persistence services to thedomain model. JDO persistent objects are ordinaryJava programming languageclasses (POJOs); there is no requirement for them to implement certaininterfaces or extend from special classes. JDO 1.0 was developed under theJava Community Process asJSR 12. JDO 2.0 was developed underJSR 243 and was released on May 10, 2006. JDO 2.1 was completed in Feb 2008, developed by theApache JDO project. JDO 2.2 was released in October 2008. JDO 3.0 was released in April 2010.
Object persistence is defined in the externalXML metafiles, which may have vendor-specific extensions. JDO vendors provide developers withenhancers, which modify compiled Java class files so they can be transparently persisted. (Note that byte-code enhancement is not mandated by the JDO specification, although it is the commonly used mechanism for implementing the JDO specification's requirements.) Currently, JDO vendors offer several options for persistence, e.g. toRDBMS, toOODB, or tofiles.
JDO enhanced classes are portable across different vendors' implementation. Once enhanced, a Java class can be used with any vendor's JDO product.
JDO is integrated withJava EE in several ways. First of all, the vendor implementation may be provided as aJEE Connector[clarify]. Secondly, JDO may work in the context of JEEtransaction services.
Enterprise JavaBeans 3.0 (EJB3) specification also covered persistence, as had EJB v2 withEntity Beans. There have been standards conflicts between the two standards bodies in terms of pre-eminence. JDO has several commercial implementations.
In the end, persistence has been "broken out" of "EJB3 Core", and a new standard formed, theJava Persistence API (JPA). JPA uses thejavax.persistence package, and was first specified in a separate document within the EJB3 specJSR 220, but was later moved to its own specJSR 317. Significantly,javax.persistence willnot require an EJB container, and thus will work within a Java SE environment as well, as JDO always has. JPA, however, is anobject-relational mapping (ORM) standard, while JDO is both an object-relational mapping standard and a transparent object persistence standard. JDO, from an API point of view, is agnostic to the technology of the underlying datastore, whereas JPA is targeted to RDBMS datastores (although there are several JPA providers that support access to non-relational datastores through the JPA API, such as DataNucleus and ObjectDB).
Leading JDO commercial implementations and open source projects also offer a JPA API implementation as an alternative access to their underlying persistence engines, formerly exposed solely via JDO in the original products. There are many open source implementations of JDO.
Connection fromjavax.jdo.PersistenceManager