|Table of Contents|
Using and Understanding Java Data Objects is the programmer's guide to JDO. Adopted by the Java Community Process, Java Data Objects (JDO) specifies a universal and transparent persistence service for Java objects.
JDO reduces the amount of code that application developers write to store and retrieve persistent state. JDO frees application designers and programmers from the details of persistence. As a result, designs can be more object-oriented, programmers can be more productive, and applications can be more robust and flexible.
This book provides you with the insight to evaluate and use JDO. It begins by explaining the concepts and terminology of JDO. It describes in detail the JDO interfaces and classes that you will use to build an application. Throughout, the book probes in depth. It identifies the specification's blemishes so you can avoid relying on behavior that is not defined. It offers coding strategies to solve common problems. It proposes working designs for common application architectures, such as client/server Swing applications, web applications, and five flavors of Enterprise JavaBeans.
The last four chapters provide a tutorial on the JDO Learning Tools, a suite of open source programs that explore JDO and exemplify its use. Using the JDO Learning Tools, you can take a JDO implementation for a test drive and examine the architecture and code of several sample applications.
About the Author
David Ezzio wrote his first application, which analyzed French elections, for a college professor in the sixties. After a detour through philosophy and other pursuits, he has worked with software teams building desktop applications, character recognition software, and Internet-related software. He has worked exclusively with Java since 1997 and is a Sun Certified Java Developer. Dave founded his consulting practice, Yankee Software, in 1988 and helped found MaineJUG in 2001. He is a member of the JDO 1.0 maintenance group. Dave holds a bachelor’s degree in mathematical logic from Yale University and a master’s degree in philosophy from the University of Chicago.
Copyright © 2003 by David Ezzio
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher.ISBN (pbk): 1-59059-043-0
Printed and bound in the United States of America 12345678910
Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark.
Technical Reviewers: Regis Le Brettevillois, John Mitchell, Abe White
Editorial Directors: Dan Appleman, Gary Cornell, Martin Streicher, Karen Watterson, John Zukowski
Assistant Publisher: Grace Wong
Project Manager: Tracy Brown Collins
Copy Editor: Ami Knox
Production Editor: Julianna Scott Fein
Composition: Susan Glinert
Indexer: Valerie Robbins
Proofreader: Elizabeth Berry
Cover Designer: Kurt Krames
Production Manager: Kari Brooks
Manufacturing Manager: Tom Debolski
Distributed to the book trade in the United States by Springer-Verlag New York, Inc., 175 Fifth Avenue, New York, NY, 10010 and outside the United States by Springer-Verlag GmbH & Co. KG, Tiergartenstr. 17, 69112 Heidelberg, Germany.
In the United States: phone 1-800-SPRINGER, email <firstname.lastname@example.org>, or visit http://www.springer-ny.com. Outside the United States: fax +49 6221 345229, email <email@example.com>, or visit http://www.springer.de.
For information on translations, please contact Apress directly at 2560 Ninth Street, Suite 219, Berkeley, CA 94710. Phone 510-549-5930, fax 510-549-5939, email <firstname.lastname@example.org>, or visit http://www.apress.com.
The information in this book is distributed on an "as is" basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work.
The source code for this book is available to readers at http://www.apress.com in the Downloads section.
This book is dedicated to my wife, Theresa, and our daughters, Pearly and Sarah.
A man is a fish who swims in the sea of a woman's love.
About the Author
David Ezzio wrote his first application, which analyzed French elections, for a college professor in the sixties. After a detour through philosophy and other pursuits, he has worked with software teams building desktop applications, character recognition software, and Internet-related software. He has worked exclusively with Java since 1997 and is a Sun Certified Java Developer. Dave founded his consulting practice, Yankee Software, in 1988 and helped found MaineJUG in 2001. He is a member of the JDO 1.0 maintenance group.
Dave holds a bachelor's degree in mathematical logic from Yale University and a master's degree in philosophy from the University of Chicago. In his free time, Dave hikes, rides his bicycle, reads history, and sails his Laser Tippity. An occasional cook, he currently takes pride in his popovers. He lives in Maine. His e-mail address is <email@example.com>.
About the Technical Reviewers
Regis Le Brettevillois has cofounded LIBeLIS (Paris, France), one of the JDO vendors, where he is acting as CTO. Before founding LIBeLIS, he was senior consultant for Versant, an ODBMS vendor. He has been in charge of Java/Database architecture for customers like Banque Nationale de Paris and France Telecom. Before this, he was consultant and R&D engineer for LM Informatique (Paris), OTI (Ottawa, Canada), and Andersen Informatique (Paris). Regis has been involved in various Java and Smalltalk projects in which object distribution and persistence technologies were strategic. Regis has a postgraduate diploma in computer science from the University of Nantes.
John Mitchell is the founder of Non.net—a Technological Business Risk Management™ consulting practice. Along with developing and rescuing distributed enterprise systems, John advises investors and executives on technology and high-tech companies. Over the past 15 years, John has been the CTO of ElasticMedia, HealthLogic.com, jGuru, and the MageLang Institute. He cowrote Making Sense of Java: A Guide for Managers and the Rest of Us and created the "Q&A" and "Tips & Tricks" columns at JavaWorld. John is writing books on distributed systems, software development, and technological risk management.
Abe White is a senior software architect at SolarMetric (http://www.solarmetric.com) and is the original author of Kodo JDO (http://www.solarmetric.com/Software/Kodo_JDO/). He became interested in JDO while working in research and development at TechTrader, where he specialized in object/relational mapping, object/XML mapping, and Java Enterprise technologies. Abe also has extensive experience with Java byte code manipulation, and is the creator of the open source Serp Bytecode Toolkit (http://serp.sourceforge.net). Abe was a founder of The Basement, a nonprofit entity based at Dartmouth College, his alma mater. The Basement creates Web-based solutions for academia. Abe is a member of the JDO Expert Group.
A lot of people had a hand in making this book. I thank all the folks at Apress who pulled everything together. Particular thanks to Ami Knox, the copy editor; Tracy Brown Collins and Sofia Marchant, the tag-team project managers; John Zukowski, the Java editor and Visio wizard; and Gary Cornell, the publisher.
I thank Craig Russell, the JDO specification lead, and the other members of the JDO maintenance group for answering my questions and responding to my suggestions.
I thank my technical reviewers, Abe White, Regis Le Brettevillois, and John D. Mitchell. They labored long and hard, and their many comments made this book better than it would otherwise have been.
For an author, a book is more than a business proposition. It is a labor of love and passion. I thank all those who encouraged me in my work. In particular, I thank my children, Pearly and Sarah, who frequently gave me impromptu encouragement. Their love of books inspired me. I thank my father, James Ezzio, and his wife, Mary, for their kind words and generous deeds. Finally, I thank my wife, Theresa. Her confidence in my abilities made the book possible.