
Using and Understanding Java Data Objects / Edition 1
by David EzzioISBN-10: 1590590430
ISBN-13: 9781590590430
Pub. Date: 06/10/2003
Publisher: Apress
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 Author | xi | |
About the Technical Reviewers | xiii | |
Acknowledgments | xv | |
Introduction | xvii | |
Chapter 1 | Basic Concepts in JDO | 1 |
The Persistence Services of JDO | 3 | |
Managed and Unmanaged Objects | 7 | |
The Ten Management States of Data Objects | 17 | |
Identity and the Uniqueness Requirement | 21 | |
Summary | 36 | |
Chapter 2 | Queries | 37 |
The Extent Interface | 37 | |
The Design of JDO's Query Service | 41 | |
The Query Interface | 41 | |
Factory Methods That Produce Query Objects | 48 | |
The Syntax of the JDO Query Filter | 49 | |
Query Variables | 55 | |
Ordering Results | 60 | |
Using or Ignoring the Cache in a Query | 62 | |
SQL Queries That Can Be Mapped to JDOQL | 64 | |
Using SQL When JDOQL Is Not Sufficient | 71 | |
How JDO and JDOQL Help the Development Process | 72 | |
Summary | 73 | |
Chapter 3 | The Persistence Manager | 75 |
The Handling of null Values in Method Parameters | 76 | |
Obtaining and Closing a Persistence Manager | 77 | |
Controlling JDO's Management of Data Objects | 78 | |
Controlling the Cache | 89 | |
Getting and Constructing Identity Objects | 95 | |
Fetching an Application Data Object by Identity | 97 | |
Factory Methods in the Persistence Manager | 98 | |
Getting the Persistence Manager's Transaction | 98 | |
The Properties of a Persistence Manager | 99 | |
Summary | 101 | |
Chapter 4 | Transactions and Caching | 103 |
Transactions | 104 | |
JDO's Transaction Interface | 108 | |
How the Transactional Properties Control State Transitions | 122 | |
The Optional Transient-Transactional Feature | 133 | |
JCA, JTA, and JDO Transactions | 135 | |
JDO's Cache of Persistent Objects and Their State | 137 | |
Summary | 141 | |
Chapter 5 | Enhanced Classess and Managed Fields | 143 |
Which Application Classes Should Be Enhanced? | 143 | |
Managed and Unmanaged Fields | 144 | |
Enhancement | 148 | |
The JDO Metadata | 166 | |
Summary | 182 | |
Chapter 6 | Factories That Produce Persistence Managers | 185 |
The PersistenceManagerFactory Interface | 185 | |
Obtaining a Persistence Manager | 186 | |
Obtaining a Persistence Manager Factory | 188 | |
Closing a Persistence Manager Factory | 194 | |
Obtaining a Connection Factory | 195 | |
Examining a JDO Implementation | 195 | |
Configuring a Persistence Manager Factory | 198 | |
Configuring Connections to the Datastore | 198 | |
JDO's Support for Container-Managed Transactions | 199 | |
JDO's Support for Bean-Managed Transactions | 201 | |
Using JDO in CMT Session Beans | 201 | |
On Returning Serialized Data Objects from Business Methods | 208 | |
Using JDO in Entity Beans with BMP | 209 | |
Using JDO in BMT Session Beans | 220 | |
Using JDO in Message-Driven Beans | 225 | |
Summary | 225 | |
Chapter 7 | Helpers, Callbacks, and Exceptions | 227 |
The JDOHelper Utility Class | 227 | |
The InstanceCallbacks Interface | 234 | |
The Exceptions of JDO | 249 | |
Summary | 267 | |
Chapter 8 | Using JDO to Learn More | 269 |
The Ant Build Scripts | 270 | |
Getting Started | 271 | |
Hello, JDO! | 276 | |
Interrogating the PersistenceManagerFactory | 278 | |
Consuming Java at the MegaCups Company | 280 | |
The Console User Interface | 283 | |
Querying the Small Town Library | 284 | |
Monitoring the State of Persistent Apples | 289 | |
Using the Commercial Implementations | 298 | |
Summary | 300 | |
Chapter 9 | Using JDO in a Swing Application | 301 |
Building the Rental Swing Application | 301 | |
Requirements for the Prototype Reservation System | 302 | |
Testing the Rental Swing Client | 306 | |
Encountering Conflicting Changes in the Rental Swing Client | 308 | |
Designing the Rental Swing Application | 310 | |
Summary | 319 | |
Chapter 10 | Using JDO in a Web Application | 321 |
Configuring the Build Environment for Tomcat | 321 | |
Building the Rental Web Application | 323 | |
Using the Rental Web Application | 325 | |
General Design Issues for Web Applications | 332 | |
The MVC Pattern in the Rental Web Application | 333 | |
Designing the Use of JDO in a Web Application | 334 | |
The One-PM-per-Request Design | 339 | |
The One-PM-per-Session Design | 354 | |
The One-PM-per-Update Design | 355 | |
Summary | 357 | |
Chapter 11 | Using JDO in Enterprise JavaBeans | 359 |
Configuring the Build Environment for JBoss | 360 | |
Building the Rental Enterprise Application | 365 | |
Design of the Rental Enterprise Application | 367 | |
Using JDO with Other Types of EJBs | 373 | |
Summary | 375 | |
Glossary | 377 | |
Appendix | Large UML Diagrams | 387 |
Index | 403 |
Customer Reviews
Average Review: