Commit 2da7fe2a authored by O'Reilly Media, Inc.'s avatar O'Reilly Media, Inc.
Browse files

Initial commit

parents
Loading
Loading
Loading
Loading

9780596002763

0 → 120000
+1 −0
Changes for 9780596002763: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
9780596002763
 No newline at end of file

README.md

0 → 100644
+15 −0
Changes for README.md: 15 added lines, 0 removed lines.
Original line number Diff line number Diff line
## Example files for the title:  
  
# Java Data Objects, by Craig Russell
  
[![Java Data Objects, by Craig Russell](http://akamaicovers.oreilly.com/images/9780596002763/cat.gif)](https://www.safaribooksonline.com/library/view/title/0596002769//)
  
The following applies to example files from material published by O’Reilly Media, Inc. Content from other publishers may include different rules of usage. Please refer to any additional usage rights explained in the actual example files or refer to the publisher’s website.
  
O'Reilly books are here to help you get your job done. In general, you may use the code in O'Reilly books in your programs and documentation. You do not need to contact us for permission unless you're reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from our books does not require permission. Answering a question by citing our books and quoting example code does not require permission. On the other hand, selling or distributing a CD-ROM of examples from O'Reilly books does require permission. Incorporating a significant amount of example code from our books into your product's documentation does require permission.
  
We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN.
  
If you think your use of code examples falls outside fair use or the permission given here, feel free to contact us at <permissions@oreilly.com>.
  
Please note that the examples are not production code and have not been carefully testing. They are provided "as-is" and come with no warranty of any kind.

README.txt

0 → 100755
+94 −0
Changes for README.txt: 94 added lines, 0 removed lines.
Original line number Diff line number Diff line
Java Data Objects

Right at the moment when the authors were completing the book,
a change was made to the reference enhancer syntax for JDO 1.0.1.
The book is based on JDO 1.0.1. Specifically, a new flag was
introduced and the approached used in JDO for naming and looking
up the metadata was changed.

Unfortuately, two things have occurred:
1. The authors did not get the reference enhancer syntax
updated correctly in all the places in the book.
2. Sun has not yet released JDO 1.0.1, only JDO 1.0 is
currently available. The authors had expected Sun to release
JDO 1.0.1 about the same time as the book's release.
Unfortunately, that did not happen.
The JDO 1.0.1 reference enhancer syntax will not work with
the JDO 1.0 reference enhancer implementation.

The description below specifies how to enhance JDO classes
with either the JDO 1.0 or 1.0.1 reference enhancer.

David Jordan
Object Identity, Inc.
www.objectidentity.com

==================================

During the writing of Java Data Objects, JDO 1.0.1 was being prepared
for public release, and we expected that the release of the book and the
specification would be concurrent. However, the release of the
specification, including the reference implementation, was delayed. In
order to run the examples in the book using either JDO 1.0 or JDO 1.0.1,
please use this information.

There are two examples of using the enhancer in the book. The first is
in Chapter 1, p. 11, Example 1-5.

To use this with the JDO 1.0.1, the metadata file is
classes/com/mediamania/prototype/package.jdo and the command line is:

com.sun.jdori.enhancer.Main -d enhanced -s classes \
classes/com/mediamania/prototype/Movie.class \
classes/com/mediamania/prototype/Actor.class \
classes/com/mediamania/prototype/Role.class

To use this example with JDO 1.0 enhancer, the metadata file is
classes/com/mediamania/prototype.jdo and the command line is:

com.sun.jdori.enhancer.Main -d enhanced \
classes/com/mediamania/prototype.jdo \
classes/com/mediamania/prototype/Movie.class \
classes/com/mediamania/prototype/Actor.class \
classes/com/mediamania/prototype/Role.class

The second example is in Chapter 6, p. 96.

To use this example with JDO 1.0.1, the metadata file is
classes/com/mediamania/package.jdo and the command line is:

java com.sun.jdori.enhancer.Main -d enhanced -s classes \
classes/com/mediamania/content/Studio.class \
classes/com/mediamania/content/MediaContent.class \
classes/com/mediamania/content/Movie.class \
classes/com/mediamania/content/Game.class \
classes/com/mediamania/content/Role.class \
classes/com/mediamania/content/MediaPerson.class \
classes/com/mediamania/store/MediaItem.class \
classes/com/mediamania/store/RentalItem.class \
classes/com/mediamania/store/RentalCode.class \
classes/com/mediamania/store/Customer.class \
classes/com/mediamania/store/Address.class \
classes/com/mediamania/store/Transaction.class \
classes/com/mediamania/store/Purchase.class \
classes/com/mediamania/store/Rental.class

To use this example with JDO 1.0, the metadata file is
classes/com/mediamania.jdo and the command line is:

java com.sun.jdori.enhancer.Main -d enhanced \
classes/com/mediamania.jdo \
classes/com/mediamania/content/Studio.class \
classes/com/mediamania/content/MediaContent.class \
classes/com/mediamania/content/Movie.class \
classes/com/mediamania/content/Game.class \
classes/com/mediamania/content/Role.class \
classes/com/mediamania/content/MediaPerson.class \
classes/com/mediamania/store/MediaItem.class \
classes/com/mediamania/store/RentalItem.class \
classes/com/mediamania/store/RentalCode.class \
classes/com/mediamania/store/Customer.class \
classes/com/mediamania/store/Address.class \
classes/com/mediamania/store/Transaction.class \
classes/com/mediamania/store/Purchase.class \
classes/com/mediamania/store/Rental.class
 No newline at end of file

foreword.html

0 → 100755
+38 −0
Changes for foreword.html: 38 added lines, 0 removed lines.
Original line number Diff line number Diff line
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Java Data Objects - Foreword</title>
</head>

<body>

<h2>Foreword</h2>


<p>Java Data Objects (JDO) is an important innovation for the Java platform. At a time when developers were using JDBC almost exclusively for database access, and expert groups from major enterprise vendors were devising the much-touted Enterprise Java Beans APIs for entity beans and container-managed persistence, Craig Russell and David Jordan had the courage to take a different course. With a handful of others, they looked for a simpler way to provide persistence in the Java platform, something that would be both natural and convenient for programmers. This book describes the result of their work: JDO.</p>


<p>The key, unique idea behind JDO is to provide database persistence in Java with a minimum of extra stuff for the programmer to do. The programmer doesn't need to learn SQL, doesn't need to tediously copy data into and out of their Java objects using JDBC calls, and can use Java classes, fields, and references in a way that is natural to them, without lots of extra method calls and coding that is extraneous to the programmer's focus and intent. Even queries can be written using Java predicates instead of SQL. In other words, the programmer just writes Java; the persistence part is automatic.</p>


<p>In addition to this transparent persistence, code written to JDO benefits from binary compatibility across implementations on different datastores. JDO can be used with an object/relational mapping, in which JDBC calls are generated automatically to map the data between Java objects and existing relational databases. Alternatively, the JDO objects can be stored directly in file pages, providing the functionality and performance of an object-oriented database.</p>


<p>The hard work on JDO paid off: the idea of transparent persistence has proven quite popular. JDO has its own community web site, <a href="http://JDOCentral.com">JDOCentral.com</a>, and on enterprise Java discussion sites such as <a href="http://TheServerSide.com">TheServerSide.com</a>, developers praise the simplicity and utility of JDO. Many developers use JDO as a replacement for entity beans, by using data objects from within session beans. Others use JDO as a convenient high-level replacement for JDBC calls in JSP pages or other Java code. JDO has come a long way from the JDBC interface I defined in 1995 with Graham Hamilton, and JDO is quite valuable in conjunction with J2EE.</p>


<p>I can't think of two individuals better qualified to write a book about JDO. Craig is the specification lead for the JDO expert group, and Dave was one of the most active members of that group. But their qualifications go far beyond that, and JDO was well designed as a result of those qualifications. Both have over a decade of experience with issues in programming language persistence, including subtle transaction semantics, different persistence models, relationships between objects, caching performance, interactions between transient and persistent objects, and programming convenience in practice. Both had extensive experience with C++ persistence before they applied their experience to Java. Both were key members of the Object Data Management Group for years. And, most importantly, both were developers who appreciated and needed the functionality that JDO provides.</p>


<p>Craig and Dave have put together a thorough, readable, and useful book. I hope you enjoy it as much as I did.</p>


<h4>Rick Cattell, Deputy Software CTO
<br />
Sun Microsystems, February 16, 2003</h4>


<p>Return to the <a href="http://oreilly.com/catalog/9780596002763/">Java Data Objects</a> catalog page.</p>
</body>
</html>

jdoexamples.ZIP

0 → 100755
+32.4 KiB

File added.

No diff preview for this file type.

Loading