Java Data Objects (JDO) is a specification of
Java
Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's List ...
object
Object may refer to:
General meanings
* Object (philosophy), a thing, being, or concept
** Object (abstract), an object which does not exist at any particular time or place
** Physical object, an identifiable collection of matter
* Goal, an ...
persistence. One of its features is a transparency of the persistence services to the
domain model
In software engineering, a domain model is a conceptual model of the domain that incorporates both behavior and data.Fowler, Martin. ''Patterns of Enterprise Application Architecture''. Addison Wesley, 2003, p. 116. In ontology engineering, a do ...
. JDO persistent objects are ordinary
Java programming language
Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible. It is a general-purpose programming language intended to let programmers ''write once, run anywh ...
classes (
POJOs); there is no requirement for them to implement certain
interfaces
Interface or interfacing may refer to:
Academic journals
* Interface (journal), ''Interface'' (journal), by the Electrochemical Society
* ''Interface, Journal of Applied Linguistics'', now merged with ''ITL International Journal of Applied Lin ...
or extend from special classes. JDO 1.0 was developed under the
Java Community Process
The Java Community Process (JCP), established in 1998, is a formalized mechanism that allows interested parties to develop standard technical specifications for Java technology. Anyone can become a JCP Member by filling a form available at thJCP w ...
a
JSR 12 JDO 2.0 was developed unde
JSR 243and was released on May 10, 2006. JDO 2.1 was completed in Feb 2008, developed by th
Apache JDOproject. JDO 2.2 was released in October 2008. JDO 3.0 was released in April 2010.
Object persistence is defined in the external
XML
Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. T ...
metafiles, which may have vendor-specific extensions. JDO vendors provide developers with ''enhancers'', 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. to
RDBMS
A relational database is a (most commonly digital) database based on the relational model of data, as proposed by E. F. Codd in 1970. A system used to maintain relational databases is a relational database management system (RDBMS). Many relation ...
, to
OODB, or to
files.
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 with
Java EE
Jakarta EE, formerly Java Platform, Enterprise Edition (Java EE) and Java 2 Platform, Enterprise Edition (J2EE), is a set of specifications, extending Java SE with specifications for enterprise features such as distributed computing and web serv ...
in several ways. First of all, the vendor implementation may be provided as a . Secondly, JDO may work in the context of JEE
transaction services.
JDO vs. EJB3 vs. JPA
Enterprise JavaBeans
Jakarta Enterprise Beans (EJB; formerly Enterprise JavaBeans) is one of several Java APIs for modular construction of enterprise software. EJB is a server-side software component that encapsulates business logic of an application. An EJB web co ...
3.0 (EJB3) specification also covered persistence, as had EJB v2 with
Entity Bean An "Entity Bean" is a type of Enterprise JavaBean, a server-side Java EE component, that represents persistent data maintained in a database. An entity bean can manage its own persistence (Bean managed persistence) or can delegate this function to ...
s. 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, the
Java Persistence API
Jakarta Persistence (JPA; formerly Java Persistence API) is a Jakarta EE application programming interface specification that describes the management of relational data in enterprise Java applications.
Persistence in this context covers three a ...
(JPA). JPA uses the
javax.persistence
package, and was first specified in a separate document within the EJB3 spe
JSR 220 but was later moved to its own spe
JSR 317 Significantly,
javax.persistence
will not require an EJB container, and thus will work within a Java SE environment as well, as JDO always has. JPA, however, is an
object-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.
New Features in JDO Version 2 Not Found In Version 1
* Disconnected object graphs concept
* Standardized ORM mapping descriptors (for ORM-based JDO implementations)
* JDOQL Enhancements (Single String Form; more String, Map & Math methods support mandated)
* Get e.g. a from
javax.jdo.PersistenceManager
* More: Named Queries (pm.newNamedQuery), FetchPlan, Sequence, Delete by Query, multiple User Objects on PM
JDO Reference Implementations
* JDO 1.0 : FOStore
* JDO 2.0 :
JPOX 1.1
* JDO 2.1 : JPOX 1.2
* JDO 2.2 :
DataNucleus
DataNucleus (formerly known as Java Persistent Objects JPOX) is an open source project (under the Apache 2 license) which provides software products around data management in Java. The DataNucleus project started in 2008 (the JPOX project started ...
AccessPlatform 1.0.1
* JDO 3.0 :
DataNucleus
DataNucleus (formerly known as Java Persistent Objects JPOX) is an open source project (under the Apache 2 license) which provides software products around data management in Java. The DataNucleus project started in 2008 (the JPOX project started ...
AccessPlatform 2.1.0
* JDO 3.1 :
DataNucleus
DataNucleus (formerly known as Java Persistent Objects JPOX) is an open source project (under the Apache 2 license) which provides software products around data management in Java. The DataNucleus project started in 2008 (the JPOX project started ...
AccessPlatform 3.2.0
* JDO 3.2 :
DataNucleus
DataNucleus (formerly known as Java Persistent Objects JPOX) is an open source project (under the Apache 2 license) which provides software products around data management in Java. The DataNucleus project started in 2008 (the JPOX project started ...
AccessPlatform 5.2.0
See also
*
Object-relational mapping
*
Object database
An object database or object-oriented database is a database management system in which information is represented in the form of objects as used in object-oriented programming. Object databases are different from relational databases which a ...
*
Java Persistence API
Jakarta Persistence (JPA; formerly Java Persistence API) is a Jakarta EE application programming interface specification that describes the management of relational data in enterprise Java applications.
Persistence in this context covers three a ...
(JPA)
*
DataNucleus
DataNucleus (formerly known as Java Persistent Objects JPOX) is an open source project (under the Apache 2 license) which provides software products around data management in Java. The DataNucleus project started in 2008 (the JPOX project started ...
*
ObjectDB
ObjectDB is an object database for Java. It can be used in client-server mode and in embedded (in process) mode.
Unlike other object databases, ObjectDB does not provide its own proprietary API. Accordingly, working with ObjectDB requires using ...
* ActiveJPA
Bibliography
*
*
*
External links
JDO 1.0 specificationJDO 2.0 specification
{{Authority control
Object-relational mapping
Data Objects
Data Objects
Java APIs