Javatm Dataobjects
Total Page:16
File Type:pdf, Size:1020Kb
JavaTM DataObjects JSR12 Version1.0 JavaDataObjectsExpertGroup SpecificationLead:CraigRussell, SunMicrosystemsInc. Technicalcomments: [email protected] Processcomments: [email protected] Forte Tools Sun Microsystems, Inc. 901 San Antonio Road Palo Alto, CA 94043 U.S.A. 650 960-1300 fax: 650 969-9131 Copyright Information 2000-2002, Sun Microsystems, Inc. All rights reserved. 901 San Antonio Rd., Palo Alto, California 94303 U.S.A. This document is protected by copyright. No part of this document may be reproduced in any form by any means without prior written authorization of Sun and its licensors, if any. The information described in this document may be protected by one or more U.S. patents, foreign patents, or pending applications. TRADEMARKS Sun, Sun Microsystems, Sun Microelectronics, the Sun Logo, SunXTL, JavaSoft, JavaOS, the JavaSoft Logo, Java, HotJava Views, HotJJava, JavaChip, picoJava, microJava, UltraJava, JDBC, the Java Cup and Steam Logo, “Write Once, Run Anywhere”, and Solaris are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. All other product names mentioned herein are the trademarks of their respective owners. THIS DOCUMENT IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. THIS DOCUMENT COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESE CHANGES WILL BE INCORPORATED IN NEW EDITIONS OF THE DOCUMENT. SUN MICROSYSTEMS, INC. MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED IN THIS DOCUMENT AT ANY TIME. Please Recycle Acknowledgments I have come to know Rick Cattell during many shared experiences in the Java database standards arena. Rick is a Distinguished Engineer at Sun Microsystems and has been the database guru and Enterprise Cardinal in the Java “Church” for many years. I am deeply in his debt for his many contributions to JDO, both technical and organizational. I want to thank the experts on the JDO expert group who contributed ideas, APIs, feedback, and other valuable input to the standard, especially Heiko Bobzin, Constantine Plotnikov, Luca Garulli, Philip Conroy, Steve Johnson, Michael Birk, Michael Rowley, Gordan Vosicki, and Mar- tin McClure. I want to recognize Michael Bouschen, David Jordan, and Jeff Norton for their careful review of JDO for consistency, readability, and usability. Without their contributions, JDO would not have been possible. Java Data Objects Table of Contents 1 Introduction . 14 1.1 Overview . 14 1.2 Scope . 15 1.3 Target Audience . 15 1.4 Organization . 15 1.5 Document Convention . 15 1.6 Terminology Convention . 16 2 Overview . 17 2.1 Definitions . 17 2.1.1 JDO common interfaces. 17 2.1.2 JDO in a managed environment. 18 Enterprise Information System (EIS) . 18 EIS Resource. 18 Resource Manager (RM). 18 Connection . 19 Application Component . 19 Session Beans . 19 Entity Beans . 19 Helper objects . 19 Container. 19 2.2 Rationale . 19 2.3 Goals . 20 3 JDO Architecture . 22 3.1 Overview . 22 3.2 JDO Architecture . .23 3.2.1 Two tier usage . 23 3.2.2 Application server usage . 23 Resource Adapter . 23 Pooling . 24 Contracts . 24 4 Roles and Scenarios . 27 4.1 Roles . 27 4.1.1 Application Developer. 27 4.1.2 Application Component Provider . 27 4.1.3 Application Assembler. 27 4.1.4 Deployer. .28 4.1.5 System Administrator . 28 4.1.6 JDO Vendor . 28 4.1.7 Connector Provider . 28 4.1.8 Application Server Vendor . 28 4.1.9 Container Provider. 29 4.2 Scenario: Embedded calendar management system . 29 4.3 Scenario: Enterprise Calendar Manager . 30 5 Life Cycle of JDO Instances . 32 5.1 Overview . 32 Java Data Objects 4 March 28, 2002 Java Data Objects Table of Contents 5.2 Goals . 33 5.3 Architecture: . 33 JDO Instances . 33 JDO State Manager. 33 JDO Managed Fields. 34 5.4 JDO Identity . 34 Three Types of JDO identity. 34 Uniquing . 35 Change of identity. 36 JDO Identity Support . 36 5.4.1 Application (primary key) identity . 36 5.4.2 Data store identity . 37 5.4.3 Nondurable JDO identity . ..