Java Data Objects (JDO)

jdo JDO defines an interface (or API) to persist normal Java objects (or POJO's in some peoples terminology) to a datastore. JDO doesn't define the type of datastore. It is datastore-agnostic . You would use the same interface to persist your Java object to RDBMS, or OODBMS, or XML, or whatever form of data storage. JDO is a standard . JDO1 has been in existence since 2002, whilst JDO2 was approved in early 2005 and there have been 2 revisions, and a major version since. JDO defines the interface that an implementation has to implement. DataNucleus Data Access Platform is an implementation of the JDO interface specification(s) (JDO1, JDO2, JDO2.1, JDO2.2, JDO3). There are other implementations. The whole point of having a standard interface is that users can, in principle, swap between implementations of JDO without changing their code.

JDO has the following principal areas.

  • JDO categorises classes into 3 types. The type of your class defines how it interacts with JDO. Some classes have no interaction with JDO, whilst others require you to define their behaviour under JDO. The first thing you do with any JDO-enabled application is provide the Persistence Definition
  • If your datastore is an RDBMS, you now need to define the Object-Relational Mapping (ORM)
  • Now you are ready to utilise the JDO API for persisting and retrieving your objects. This is performed using a PersistenceManagerFactory/ PersistenceManager. The persistence of Java objects results in changes to the lifecycle state of the objects.
  • Querying your objects in the datastore.

Apache JDO is the project controlling the direction of the JDO standard and, as such, is the place to go for information specific to the standard API.

You could also download a Free JDO1 book and do some reading.

This release of DataNucleus AccessPlatform requires JDO2.3, which is not yet released. You can find a snapshot of this (built from Apache JDO SVN) included in the AccessPlatform download, or on our Maven2 repository