ArticleslgStudy

science

Java Data Objects

Java Data Objects is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Java Data Objects rather than just read about it. In short: Java Data Objects (JDO) is a specification of Java object persistence. One of its features is a transparency of the persistence services to the domain model.

Key takeaways

  • Java Data Objects belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Java Data Objects to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Java Data Objects from memory before moving on to harder problems.

Reference excerpt

Java Data Objects (JDO) is a specification of Java object persistence. One of its features is a transparency of the persistence services to the domain model. JDO persistent objects are ordinary Java programming language classes (POJOs); there is no requirement for them to implement certain interfaces or extend from special classes. JDO 1.0 was developed under the Java Community Process as JSR 12. JDO 2.0 was developed under JSR 243 and was released on May 10, 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 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, 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 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.

JDO vs. EJB3 vs. JPA Enterprise JavaBeans 3.0 (EJB3) specification also covered persistence, as had EJB v2 with Entity 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, the Java Persistence API (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 (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 java.sql.Connection 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 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) DataNucleus ObjectDB ActiveJPA

Bibliography

External links JDO 1.0 specification JDO 2.0 specification JDO 2.1 specification JDO 2.2 specification JDO 3.0 specification

Worked examples

Example 1 — a first encounter with Java Data Objects

Start with the simplest possible case. Write down what Java Data Objects claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Java Data Objects before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Java Data Objects ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Java Data Objects

In research
Java Data Objects appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Java Data Objects in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Java Data Objects is common in secondary-school and first-year university syllabi. It links to neighbouring topics Java APIs, Java enterprise platform, Java specification requests, so understanding it makes those chapters shorter.
In everyday life
Look for Java Data Objects outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Java Data Objects” →

How to study Java Data Objects in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Java Data Objects means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Java Data Objects out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Java Data Objects in simple terms?

Java Data Objects (JDO) is a specification of Java object persistence. One of its features is a transparency of the persistence services to the domain model.

Why does Java Data Objects matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Java Data Objects?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Java Data Objects.

Tags

  • Java APIs
  • Java enterprise platform
  • Java specification requests
  • Object–relational mapping

Keep exploring