Java Data Objects
Encyclopedia
Java Data Objects is a specification of Java object
Object (computer science)
In computer science, an object is any entity that can be manipulated by the commands of a programming language, such as a value, variable, function, or data structure...

 persistence
Persistence (computer science)
Persistence in computer science refers to the characteristic of state that outlives the process that created it. Without this capability, state would only exist in RAM, and would be lost when this RAM loses power, such as a computer shutdown....

. One of its features is a transparency of the persistent services to the domain model
Domain model
A domain model in problem solving and software engineering can be thought of as a conceptual model of a domain of interest which describes the various entities, their attributes, roles and relationships, plus the constraints that govern the integrity of the model elements comprising that problem...

. JDO persistent objects are ordinary Java programming language
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...

 classes
Class (computer science)
In object-oriented programming, a class is a construct that is used as a blueprint to create instances of itself – referred to as class instances, class objects, instance objects or simply objects. A class defines constituent members which enable these class instances to have state and behavior...

 (POJOs
Plain Old Java Object
In computing software, POJO is an acronym for Plain Old Java Object. The name is used to emphasize that a given object is an ordinary Java Object, not a special object...

); there's no requirement for them to implement certain interfaces
Interface (Java)
An interface in the Java programming language is an abstract type that is used to specify an interface that classes must implement. Interfaces are declared using the interface keyword, and may only contain method signature and constant declarations...

 or extend from special classes. JDO 1.0 was developed under the Java Community Process
Java Community Process
The Java Community Process or JCP, established in 1998, is a formalized process that allows interested parties to get involved in the definition of future versions and features of the Java platform....

 as JSR 12. JDO 2.0 was developed under JSR 243 and was released on May 10th, 2006. JDO 2.1 was completed in Feb 2008, developed by the Apache JDO project. JDO 2.2 was released in October 2008. JDO 3.0 was released in April 2010.

Object persistence is defined in the external XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....

 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
Relational database
A relational database is a database that conforms to relational model theory. The software used in a relational database is called a relational database management system . Colloquial use of the term "relational database" may refer to the RDBMS software, or the relational database itself...

, to OODB
Object database
An object database is a database management system in which information is represented in the form of objects as used in object-oriented programming...

, to files
Computer file
A computer file is a block of arbitrary information, or resource for storing information, which is available to a computer program and is usually based on some kind of durable storage. A file is durable in the sense that it remains available for programs to use after the current program has finished...

.

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
Java Platform, Enterprise Edition
Java Platform, Enterprise Edition or Java EE is widely used platform for server programming in the Java programming language. The Java platform differs from the Java Standard Edition Platform in that it adds libraries which provide functionality to deploy fault-tolerant, distributed, multi-tier...

 in several ways. First of all, the vendor implementation may be provided as a JEE Connector. Secondly, JDO may work in the context of JEE transaction services
Java transaction service
The Java Transaction Service is a specification for building a transaction manager that maps onto the Object Management Group Object Transaction Service used in the Common Object Request Broker Architecture architecture...

.

JDO vs. EJB3 vs. JPA

Enterprise Java Beans 3.0 (EJB3) specification also covered persistence, as had EJB v2 with Entity Beans. There has been standards conflict 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
Java Persistence API
The Java Persistence API, sometimes referred to as JPA, is a Java programming language framework managing relational data in applications using Java Platform, Standard Edition and Java Platform, Enterprise Edition....

 (JPA). JPA uses the javax.persistence package, and was first specified in a separate document within the EJB3 spec JSR 220, but was later moved to its own spec 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
Object-relational mapping
Object-relational mapping in computer software is a programming technique for converting data between incompatible type systems in object-oriented programming languages. This creates, in effect, a "virtual object database" that can be used from within the programming language...

 (ORM) standard, while JDO is both an Object-relational mapping
Object-relational mapping
Object-relational mapping in computer software is a programming technique for converting data between incompatible type systems in object-oriented programming languages. This creates, in effect, a "virtual object database" that can be used from within the programming language...

 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 AccessPlatform 1.0.1
  • JDO 3.0 : DataNucleus AccessPlatform 2.1.0

See also

  • Object-relational mapping
    Object-relational mapping
    Object-relational mapping in computer software is a programming technique for converting data between incompatible type systems in object-oriented programming languages. This creates, in effect, a "virtual object database" that can be used from within the programming language...

  • Object database
    Object database
    An object database is a database management system in which information is represented in the form of objects as used in object-oriented programming...

  • Java Persistence API
    Java Persistence API
    The Java Persistence API, sometimes referred to as JPA, is a Java programming language framework managing relational data in applications using Java Platform, Standard Edition and Java Platform, Enterprise Edition....

     (JPA)
  • DataNucleus
    DataNucleus
    DataNucleus is an open source project which provides a series of software products around data management in Java....

  • ObjectDB
    ObjectDB
    ObjectDB is an Object Database for Java. It can be used in client-server mode and in embedded mode.Unlike other object databases, ObjectDB does not provide its own proprietary API. Accordingly, working with ObjectDB requires using one of the two standard Java APIs - JPA or JDO...


External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK