blob: 3cc37f0c9c46c2691d81f5bcaa0afc861a157611 [file] [log] [blame]
<!--
Copyright 2005 The Apache Software Foundation.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<head>
<title>JDO package</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF">
This package contains the JDO specification interfaces and classes.
<P>There are two major objectives of the JDO architecture:
first, to provide application programmers a transparent,
Java-centric view of persistent information, including enterprise data
and locally stored data; and second, to enable pluggable implementations
of data stores into
application servers. Data stored in data stores is presented as
instances of persistence-capable classes.
<P>JDO defines interfaces and classes to be used by application programmers
when using classes whose instances are to be stored in persistent storage
(persistence-capable classes), and specifies the contracts between
suppliers of persistence-capable classes and the
runtime environment (which is part of the JDO implementation).
<P>The JDO architecture defines a standard set of contracts between an
application programmer and an JDO vendor. These contracts focus on the
view of the Java instances of persistence capable classes.
<P>The JDO PersistenceManagerFactory is the boostrap class for a JDO
application. The application gets an instance of the
PersistenceManagerFactory by construction or via JDNI lookup.
<P>The application acquires an instance of the JDO PersistenceManager by
calling the getPersistenceManager method on an instance of JDO
PersistenceManagerFactory.
<P>The JDO PersistenceManager is the primary interface for JDO-aware
application components:
<ul>
<li>it gives access to the current Transaction interface;
<li>it is the factory for the Query interface;
<li>it contains methods for managing the life cycle of persistent instances.
</ul>
<P>A JDO PersistenceManager instance supports any number of JDO instances
at a time. It is responsible for managing the identity of its
associated JDO instances. A JDO instance is associated with either
zero or one JDO PersistenceManager. It will be zero if and only if the
JDO instance is transient nontransactional. As soon as the instance is made persistent
or transactional, it will be associated with exactly one JDO PersistenceManager.
<P>A JDO PersistenceManager instance supports one transaction at a time,
and uses one connection to the underlying data source at a time. The JDO
PersistenceManager instance might use multiple transactions serially,
and might use multiple connections serially.
<P>Normally, cache management is automatic and transparent. When instances
are queried, navigated to, or modified, instantiation of instances and
their fields and garbage collection of unreferenced instances occurs
without any explicit control. When the transaction in which persistent
instances are created, deleted, or modified commits, eviction is
automatically done by the transaction completion mechanisms.
<P>Operations on persistent JDO instances at the user's choice might be
performed in the context of a transaction. That is, the view of data
in the data store is transactionally consistent, according to the
standard definition of ACID transactions.
<P>The Transaction interface is used to mark the beginning and end of a
application-defined unit of work. The PersistenceManager allows the
application to get the instance that manages these transactional
boundaries via the currentTransaction method.
<P>The persistent manager instance is a factory for query instances,
and queries are executed in the context of the persistent manager instance.
The actual query execution might be performed by the JDO PersistenceManager
or might be delegated by the JDO PersistenceManager to its data store.
The actual query executed thus might be implemented in a very different
language from Java, and might be optimized to take advantage of particular
query language implementations.
<P>Extents are collections of data store objects managed by the data store,
not by explicit user operations on collections. Extent capability is a
boolean property of classes that are persistence capable. If an instance
of a class that has a managed extent is made persistent via reachability,
the instance is put into the extent implicitly.
</body>
</html>