Java Data Objects: Difference between revisions

Content deleted Content added
 
(71 intermediate revisions by 59 users not shown)
Line 1:
{{Short description|Specification of Java object persistence}}
'''Java Data Objects''' ('''JDO''') is a specification of [[Java platform|Java]] [[object (computer science)|object]] [[Persistence (computer science)|persistence]]. One of its features is a transparency of the persistent services to the [[___domain model]]. JDO persistent objects are ordinary [[Java (programming language)|Java programming language]] [[class (computer science)|classes]]; there's no requirement for them to implement certain [[interface (Java)|interfaces]] or extend from special classes. JDO 1.0 was developed under the [[Java Community Process]] as [http://www.jcp.org/en/jsr/detail?id=12 JSR 12]. JDO 2.0 was developed under [http://www.jcp.org/en/jsr/detail?id=243 JSR 243] and was released on [[May 10|May 10th]], [[2006]]. JDO 2.1 is now underway, being developed by the [http://db.apache.org/jdo/ Apache JDO] project.
{{No footnotes|date=June 2010}}
'''Java Data Objects''' ('''JDO''') is a specification of [[Java platform|Java]] [[object (computer science)|object]] [[Persistence (computer science)|persistence]]. One of its features is a transparency of the persistentpersistence services to the [[___domain model]]. JDO persistent objects are ordinary [[Java (programming language)|Java programming language]] [[class (computer science)|classes]] ([[Plain old Java object|POJOs]]); there's is no requirement for them to implement certain [[interface (Java)|interfaces]] or extend from special classes. JDO 1.0 was developed under the [[Java Community Process]] as [http://www.jcp.org/en/jsr/detail?id=12 JSR 12]. JDO 2.0 was developed under [http://www.jcp.org/en/jsr/detail?id=243 JSR 243] and was released on [[May 10|May 10th]], [[2006]]. JDO 2.1 iswas nowcompleted underway,in beingFeb 2008, developed by the [http://db.apache.org/jdo/ 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]] 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 [[Relational database|RDBMS]], to [[Object database|OODB]], or to [[Computer file|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 Platform, Enterprise Edition|Java EE]] in several ways. First of all, the vendor implementation may be provided as a {{clarify-span|JEE Connector|date=October 2012}}. Secondly, JDO may work in the context of JEE [[Java transaction service|transaction services]].
 
== JDO vs. EJB3 vs. JPA ==
[[Enterprise Java BeansJavaBeans]] 3.0 (EJB3) specification also covered persistence, as had EJB v2 with [[Entity BeansBean]]s. There hashave been standards conflictconflicts 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]] (JPA). JPA uses the <code>javax.persistence</code> package, and iswas first specified in a separate document within the EJB3 spec [http://www.jcp.org/en/jsr/detail?id=220 JSR 220], but was later moved to its own spec [http://www.jcp.org/en/jsr/detail?id=317 JSR 317]. Significantly, <code>javax.persistence</code> 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 [[Objectobject-relational mapping]] (ORM) standard, while JDO is both an [[Objectobject-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 isn'tis beingtargeted oriented aroundto RDBMS datastores (although there are several JPA providers that support access to non-relational datastores through the JPA API, such as DataNucleus and ObjectDB).
[[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.
 
Leading JDO commercial implementations and open source projects willalso and some already are offeringoffer a JPA API implementation as an alternative access to their underlying persistence engines, formerly exposed solely via JDO only in the original products. There are many open source implementations of JDO.
In the end, persistence has been "broken out" of "EJB3 Core", and a new standard formed, the [[Java Persistence API]] (JPA). JPA uses the javax.persistence package, and is specified in a separate document within the EJB3 [http://www.jcp.org/en/jsr/detail?id=220 JSR 220]. 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 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 isn't being oriented around RDBMS datastores.
 
Leading JDO commercial implementations and open source projects will and some already are offering a JPA API implementation as an alternative access to their underlying persistence engines, formerly exposed via JDO only in the original products. There are many open source implementations of JDO.
 
== New Features in JDO Version 2 Not Found In Version 1 ==
 
* Disconnected Objectobject Graphsgraphs concept
* Standardized ORM Mappingmapping Descriptorsdescriptors (for ORM-based JDO Implementationsimplementations)
* JDOQL Enhancements (Single String Form; more String, Map & Math methods support mandated)
* Get e.g. a {{Javadoc:SE|java./sql.|Connection|module=java.sql}} from <code>javax.jdo.PersistenceManager</code>
* 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 : [[DataNucleus|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
* JDO 3.1 : [[DataNucleus]] AccessPlatform 3.2.0
* JDO 3.2 : [[DataNucleus]] AccessPlatform 5.2.0
 
== See also ==
 
* [[Object-relational mapping]]
* [[Object database]]
* [[Java Persistence API]] (JPA)
* [[JPOX]]
* [[Datanucleus|DataNucleus Access Platform]]
* [[JPOXObjectDB]]
* [http://db.apache.org/jdo/ Apache JDO]
* ActiveJPA
 
==Bibliography==
{{refbegin}}
* {{cite book
| first1 = David
| last1 = Jordan
| first2 = Craig
| last2 = Russell
| date = April 22, 2003
[[de:| title = Java Data Objects]]
| publisher = [[O'Reilly Media]]
| edition = 1st
| pages = 384
| isbn = 0-596-00276-9
| url = http://oreilly.com/catalog/9780596002763
}}
* {{cite book
| first1 = Sameer
| last1 = Tyagi
| first2 = Michael
| last2 = Vorburger
| first3 = Keiron
| last3 = McCammon
| first4 = Heiko
| last4 = Bobzin
| date = September 21, 2003
[[ja:| title = Core Java Data Objects]]
| publisher = [[Prentice Hall]]
| edition = 1st
| pages = 576
| isbn = 0-13-140731-7
| url = http://www.informit.com/store/product.aspx?isbn=0131407317
}}
* {{cite book
|first = David
|last = Ezzio
|date = June 6, 2003
|title = Using and Understanding Java Data Objects
|publisher = [[Apress]]
|edition = 1st
|pages = 456
|isbn = 1-59059-043-0
|url = http://www.apress.com/book/view/9781590590430
|access-date = February 8, 2010
|archive-date = December 23, 2010
|archive-url = https://web.archive.org/web/20101223171047/http://apress.com/book/view/9781590590430
|url-status = dead
}}
{{refend}}
 
== External links ==
=== Specifications ===
* [http://www.jcp.org/en/jsr/detail?id=12 JDO 1.0 specification]
* [http://www.jcp.org/en/jsr/detail?id=243 JDO 2.0 specification]
* [http://db.apache.org/jdo/specifications.html JDO 2.1 specification drafts]
* [http://db.apache.org/jdo/ Apachespecifications.html JDO 2.2 specification]
 
* [http://db.apache.org/jdo/specifications.html JDO 3.0 specification]
=== Implementations ===
==== Open Source ====
* [http://www.jpox.org/ JPOX] &ndash; Open Source JDO 2 reference implementation ([[Object-relational mapping|ORM]])
* [http://www.datanucleus.org/ DataNucleus Access Platform]
* [http://www.eclipse.org/jsr220orm/ Eclipse JSR 220] [[Object-relational mapping|ORM]] &ndash; (formerly Versant Open Access which was formerly Hemisphere Technologies JDO Genie)
* [http://sourceforge.net/projects/orient Orient Technologies] &ndash; [[ODBMS]] with JDO interface
* [http://sourceforge.net/projects/jdoinstruments JDOinstruments ] &ndash; [[ODBMS]] with JDO interface
* [http://speedo.objectweb.org Speedo ] &ndash; Open Source JDO 2 implementation ([[Object-relational mapping|ORM]])
 
==== Commercial ====
* [http://bea.com/kodo/ Bea Kodo]
* [http://www.signsoft.de/signsoft/en/Produkte/intelliBO/ Signsoft intelliBO]
 
 
{{Authority control}}
[[Category:Java platform|Data Objects]]
[[Category:Object–relational mapping]]
[[Category:Java enterprise platform|Data Objects]]
[[Category:Java specification requests|Data Objects]]
[[Category:Java APIs]]
[[de:Java Data Objects]]
[[fr:Java Data Object]]
[[ja:Java Data Objects]]
[[pt:JDO]]