B.1. Metadata Location

JDO metadata is specified in an XML file that must be available both during the enhancement process and at runtime. Because JDO can be used in many different application architecture scenarios, the location of the metadata file is quite flexible.

The metadata for a persistence-capable class can be located in a metadata file specific to the class or in a file that contains metadata for all persistence-capable classes in a given package hierarchy. A metadata file specific to a single class must be named after the class itself, but with a .jdo suffix. For example, the metadata for an Author class could be located in a file called Author.jdo. Alternatively, the metadata could be located in a file called package.jdo. This file ...

Get Core Java™ Data Objects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.