Using and Understanding Java Data Objects / Edition 1

Using and Understanding Java Data Objects / Edition 1

by David Ezzio
     
 

ISBN-10: 1590590430

ISBN-13: 9781590590430

Pub. Date: 06/10/2003

Publisher: Apress

"Using and Understanding Java Data Objects" is an application programmer's guide to the Java Data Objects (JDO) specification recently accepted by the Java Community Process. JDO provides a universal and transactional persistence service for objects. JDO will store and retrieve objects of nearly any application defined class using any data storage technology for which

Overview

"Using and Understanding Java Data Objects" is an application programmer's guide to the Java Data Objects (JDO) specification recently accepted by the Java Community Process. JDO provides a universal and transactional persistence service for objects. JDO will store and retrieve objects of nearly any application defined class using any data storage technology for which a JDO implementation is available. JDO completely encapsulates the details of the underlying data storage technology that is used. JDO has its own query language (JDOQL) that allows the programmer to find objects based on the fields and relationships of the object model. The syntax of JDOQL is similar to the syntax of Java itself. JDO increases programming productivity by simplifying and minimizing the code that must be written to store and retrieve object state. The use of JDO also allows the application to be ported across different data storage technologies.

Like the servlet and EJB specification, JDO is a standard that will be implemented by competing software vendors. Several JDO implementations are currently available as third party products for relational databases and object oriented databases.

"Using and Understanding Java Data Objects" is a guide to the features and uses of JDO. Part I is a guide to the JDO API, the JDO metadata, and JDO's byte code enhancement. Part II explains the use of JDO in several application deployment scenarios, including stand-alone, client-server, servlet, and EJBs. Part III is a tutorial explaining the example programs and learning tools supplied with the book.

Product Details

ISBN-13:
9781590590430
Publisher:
Apress
Publication date:
06/10/2003
Edition description:
2003
Pages:
456
Product dimensions:
7.52(w) x 9.25(h) x 0.04(d)

Table of Contents

About the Authorxi
About the Technical Reviewersxiii
Acknowledgmentsxv
Introductionxvii
Chapter 1Basic Concepts in JDO1
The Persistence Services of JDO3
Managed and Unmanaged Objects7
The Ten Management States of Data Objects17
Identity and the Uniqueness Requirement21
Summary36
Chapter 2Queries37
The Extent Interface37
The Design of JDO's Query Service41
The Query Interface41
Factory Methods That Produce Query Objects48
The Syntax of the JDO Query Filter49
Query Variables55
Ordering Results60
Using or Ignoring the Cache in a Query62
SQL Queries That Can Be Mapped to JDOQL64
Using SQL When JDOQL Is Not Sufficient71
How JDO and JDOQL Help the Development Process72
Summary73
Chapter 3The Persistence Manager75
The Handling of null Values in Method Parameters76
Obtaining and Closing a Persistence Manager77
Controlling JDO's Management of Data Objects78
Controlling the Cache89
Getting and Constructing Identity Objects95
Fetching an Application Data Object by Identity97
Factory Methods in the Persistence Manager98
Getting the Persistence Manager's Transaction98
The Properties of a Persistence Manager99
Summary101
Chapter 4Transactions and Caching103
Transactions104
JDO's Transaction Interface108
How the Transactional Properties Control State Transitions122
The Optional Transient-Transactional Feature133
JCA, JTA, and JDO Transactions135
JDO's Cache of Persistent Objects and Their State137
Summary141
Chapter 5Enhanced Classess and Managed Fields143
Which Application Classes Should Be Enhanced?143
Managed and Unmanaged Fields144
Enhancement148
The JDO Metadata166
Summary182
Chapter 6Factories That Produce Persistence Managers185
The PersistenceManagerFactory Interface185
Obtaining a Persistence Manager186
Obtaining a Persistence Manager Factory188
Closing a Persistence Manager Factory194
Obtaining a Connection Factory195
Examining a JDO Implementation195
Configuring a Persistence Manager Factory198
Configuring Connections to the Datastore198
JDO's Support for Container-Managed Transactions199
JDO's Support for Bean-Managed Transactions201
Using JDO in CMT Session Beans201
On Returning Serialized Data Objects from Business Methods208
Using JDO in Entity Beans with BMP209
Using JDO in BMT Session Beans220
Using JDO in Message-Driven Beans225
Summary225
Chapter 7Helpers, Callbacks, and Exceptions227
The JDOHelper Utility Class227
The InstanceCallbacks Interface234
The Exceptions of JDO249
Summary267
Chapter 8Using JDO to Learn More269
The Ant Build Scripts270
Getting Started271
Hello, JDO!276
Interrogating the PersistenceManagerFactory278
Consuming Java at the MegaCups Company280
The Console User Interface283
Querying the Small Town Library284
Monitoring the State of Persistent Apples289
Using the Commercial Implementations298
Summary300
Chapter 9Using JDO in a Swing Application301
Building the Rental Swing Application301
Requirements for the Prototype Reservation System302
Testing the Rental Swing Client306
Encountering Conflicting Changes in the Rental Swing Client308
Designing the Rental Swing Application310
Summary319
Chapter 10Using JDO in a Web Application321
Configuring the Build Environment for Tomcat321
Building the Rental Web Application323
Using the Rental Web Application325
General Design Issues for Web Applications332
The MVC Pattern in the Rental Web Application333
Designing the Use of JDO in a Web Application334
The One-PM-per-Request Design339
The One-PM-per-Session Design354
The One-PM-per-Update Design355
Summary357
Chapter 11Using JDO in Enterprise JavaBeans359
Configuring the Build Environment for JBoss360
Building the Rental Enterprise Application365
Design of the Rental Enterprise Application367
Using JDO with Other Types of EJBs373
Summary375
Glossary377
AppendixLarge UML Diagrams387
Index403

Customer Reviews

Average Review:

Write a Review

and post it to your social network

     

Most Helpful Customer Reviews

See all customer reviews >