Java Data Objects. JSR000012, Version 0.8 Public Review Draft. Specification Lead: Craig Russell, Sun Microsystems Inc.



Similar documents
Client-Server Architecture & J2EE Platform Technologies Overview Ahmed K. Ezzat

Complex Data and Object-Oriented. Databases

What Is the Java TM 2 Platform, Enterprise Edition?

Chapter 4. Architecture. Table of Contents. J2EE Technology Application Servers. Application Models

Contents. Client-server and multi-tier architectures. The Java 2 Enterprise Edition (J2EE) platform

How to Build an E-Commerce Application using J2EE. Carol McDonald Code Camp Engineer

How To Protect Your Computer From Being Hacked On A J2Ee Application (J2Ee) On A Pc Or Macbook Or Macintosh (Jvee) On An Ipo (J 2Ee) (Jpe) On Pc Or

CACHÉ: FLEXIBLE, HIGH-PERFORMANCE PERSISTENCE FOR JAVA APPLICATIONS

Oracle WebLogic Foundation of Oracle Fusion Middleware. Lawrence Manickam Toyork Systems Inc

Enterprise Applications

Component Middleware. Sophie Chabridon. INT - INF Department - Distributed Systems team 2006

White Paper: 1) Architecture Objectives: The primary objective of this architecture is to meet the. 2) Architecture Explanation

CHAPTER 1 - JAVA EE OVERVIEW FOR ADMINISTRATORS

Core J2EE Patterns, Frameworks and Micro Architectures

The Enterprise Java Internet Provider

BEAWebLogic. Server. Programming WebLogic Resource Adapters

Oracle WebLogic Server 11g Administration

Architectural Overview

NetBeans IDE Field Guide

Infrastructure for Automatic Dynamic Deployment of J2EE Applications in Distributed Environments

WebSphere Server Administration Course

Enterprise Application Development In Java with AJAX and ORM

IBM WebSphere Server Administration

<Insert Picture Here> Java EE 7: the New Cloud Platform

Japan Communication India Skill Development Center

Communiqué 4. Standardized Global Content Management. Designed for World s Leading Enterprises. Industry Leading Products & Platform

GlassFish v3. Building an ex tensible modular Java EE application server. Jerome Dochez and Ludovic Champenois Sun Microsystems, Inc.

Glassfish, JAVA EE, Servlets, JSP, EJB

Java 2 Platform, Enterprise Edition (J2EE): Enabling Technologies for EAI

Distributed Database Design

Announcements. Comments on project proposals will go out by in next couple of days...

A Generic Database Web Service

A framework for web-based product data management using J2EE

Extreme Java G Session 3 Main Theme Java Core Technologies (Part I) Dr. Jean-Claude Franchitti

Course Description. Course Audience. Course Outline. Course Page - Page 1 of 5

Introduction to Sun ONE Application Server 7

WebSphere Application Server - Introduction, Monitoring Tools, & Administration

Transparent Persistence with

Internet Engineering: Web Application Architecture. Ali Kamandi Sharif University of Technology Fall 2007

THE JAVA DATA Objects (JDO) specific a t i o n

The Sun Certified Associate for the Java Platform, Standard Edition, Exam Version 1.0

INTRODUCTION TO JAVA PROGRAMMING LANGUAGE

SAP Web Application Server 6.30: Learning Map for Development Consultants

WebSphere Training Outline

Oracle WebLogic Server

Specialized Programme on Web Application Development using Open Source Tools

Distributed Objects and Components

Project SailFin: Building and Hosting Your Own Communication Server.

rpaf KTl enterprise EJB 3.1 Cookbook I I flv* IV I I professional expertise distilled

Increasing IT flexibility with IBM WebSphere ESB software.

A Beginners Guide to Fusion Middleware

CONSUMER DEMAND MONITORING AND SALES FORECASTING (CDMFS) SYSTEM

CSI 2132 Lab 8. Outline. Web Programming JSP 23/03/2012

PROGRESS Portal Access Whitepaper

Infrastructure that supports (distributed) componentbased application development

1. Introduction What is Slice? Background Why Slice? Purpose of this Document Intended Audience...

A standards-based approach to application integration

EJB & J2EE. Component Technology with thanks to Jim Dowling. Components. Problems with Previous Paradigms. What EJB Accomplishes

Web Development with the Eclipse Platform

<Insert Picture Here> Java EE 7: the New Cloud Platform

New Methods for Performance Monitoring of J2EE Application Servers

ACM Crossroads Student Magazine The ACM's First Electronic Publication

<Insert Picture Here> Java EE 7. Linda DeMichiel Java EE Platform Lead

The end. Carl Nettelblad

What Perl Programmers Should Know About Java

WEB APPLICATION DEVELOPMENT. UNIT I J2EE Platform 9

Japan Communication India Skill Development Center

Java 2 Platform, Enterprise Edition (J2EE) Bruno Souza Java Technologist, Sun Microsystems, Inc.

Partitioning and Clustering Demonstration

JReport Server Deployment Scenarios

As you learned about in Chapter 1, WebSphere Application Server V6 supports the

JAVA ENTERPRISE IN A NUTSHELL. Jim Farley and William Crawford. O'REILLY 4 Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo.

Sun Microsystems Inc. Java Transaction Service (JTS)

Case Studies of Running the Platform. NetBeans UML Servlet JSP GlassFish EJB

Version Overview. Business value

OUR COURSES 19 November All prices are per person in Swedish Krona. Solid Beans AB Kungsgatan Göteborg Sweden

Java Application Developer Certificate Program Competencies

Java Technology in the Design and Implementation of Web Applications

Monitoring Pramati EJB Server

Stock Trader System. Architecture Description

Learning GlassFish for Tomcat Users

ARM-BASED PERFORMANCE MONITORING FOR THE ECLIPSE PLATFORM

Running and Testing Java EE Applications in Embedded Mode with JupEEter Framework

The Java EE 6 Platform. Alexis Moussine-Pouchkine GlassFish Team

The Java EE 7 Platform and Support for the PaaS Model

Building Web Applications, Servlets, JSP and JDBC

ITG Software Engineering

A standards-based network monitoring system

Converting Java EE Applications into OSGi Applications

How To Create A C++ Web Service

IBM WebSphere Application Server Network Deployment for Distributed Platforms, Version 8.5. Establishing highly available services for applications

Open EMS Suite. O&M Agent. Functional Overview Version 1.2. Nokia Siemens Networks 1 (18)

Smalltalk in Enterprise Applications. ESUG Conference 2010 Barcelona

JAVA Technologies QUARTER 1 DESKTOP APPLICATIONS - ESSENTIALS QUARTER 2 NETWORKING AND OPERATING SYSTEMS ESSENTIALS. Module 1 - Office Applications

An Overview of Java. overview-1

MAKING ORACLE AND SQLJ WORK FOR YOU John Jay King, King Training Resources

Managing Complexity in Mobile Application Deployment Using the OSGi Service Platform

Operations and Monitoring with Spring

10. Ausblick Zusammenfassung. Datenbanksysteme und ihre Realisierung. Datenmodelle. Anwendungen. RDM (Kap. 3) Transaktionen (Kap.

Using the DataDirect Connect for JDBC Drivers with the Sun Java System Application Server

Transcription:

Java Data Objects JSR000012, Version 0.8 Public Review Draft Specification Lead: Craig Russell, Sun Microsystems Inc. Lubomír Bulej

Introduction Data access: different techniques for different data types different API for each data source type Persistent storage: serialization (preserves relations, no sharing among users) JDBC (explicit management & mapping into tables) Increased productivity: data represented by native classes mappings done by EIS expert Main objectives: pluggable implementation of data stores into application servers provide Java-centric view of persistent data Java Data Objects 2

Introduction, continued Contract types: programmer / JDO vendor focused on instances of persistence capable classes JDO vendor / application server J2EE CA: instance, connection & transaction management integration of EIS using JCA Interface types: application developer oriented container provider /JDO vendor oriented Typical scenarios: managed (application server) non-managed (local storage), does not require CA Java Data Objects 3

Overview: Definitions Common interfaces JDO Instance: implements application functions, represents data in the store single or multiple data store entities (object, row, query result) implements PersistenceCapable interface JDO Implementation: classes implementing JDO contracts, provided by JDO vendor provides PersistenceManager, Query and Transaction interfaces JDO Enhancer: enhances byte-code of classes implementing application component enables transparency for loading/storing of instance fields binary compatibility between reference/compliant enhancers required Java Data Objects 4

Overview: Definitions, continued Managed Environment: Enterprise Information System (provides infrastructure) EIS Resource (EIS-specific functionality) Resource Manager (shared resources, requested by clients) Connection (connectivity to RM, [non-]transactional) Application Component (EJB, JSP, servlet) Session Beans (do not represent data, execute on behalf of client) Entity Beans (do represent data, allow shared access) Helper Objects (for use by local session/entity beans) Container (deployment/runtime support for application compoments) Non-managed Environment: does not rely on mid-tier services for security, transaction and connection JDO hides EIS specific issues (data type/relationship mapping, etc.) Java Data Objects 5

Overview: Rationale, Goals JDO Architecture Rationale: No standard architecture for persistent transactional storage JDO presents consistent view of data from existing systems Standardized data access interface to different EISes Allows for plug-n-play and extend once, exploit many times JDO Architecture Goals: store data without learning new data-access language simplify development of JDO implementations suitability for wide range of uses allow direct use of JDO implementation in non-managed environment Java Data Objects 6

JDO Architecture: Overview Non-managed JDO architecture Managed JDO architecture transparent distributed transaction, security, connection management hides contracts between application server and JDO implementation Java Data Objects 7

JDO Architecture: Usage types Two-tier usage: javax.jdo.persistencemanager query, transaction, life cycle management services javax.jdo.persistencecapable instance life cycle state interrogation Application server usage: JDO persistence manager is caching manager as defined in J2EE CA uses native or third party resource adapter native must implement system-level contracts as specified by J2EE CA PersistenceManager must implement Synchronization Resource adapter: used to connect to resource manager JDO vendor specific interface Java Data Objects 8

JDO Architecture: AS usage Pooling: persistence managers (optional, not standardized) connections to data stores (governed by CA contracts) Contracts: JDO specifies contract between components and PersistenceManager J2EE CA specifies contracts between servers and EIS connector: connection management (implemented by JDO native resource adapter) transaction management (transaction manager - connection manager) security contract Java Data Objects 9

JDO Architecture: Contracts Contracts between server and native JDO resource adapter Java Data Objects 10

JDO Architecture: Contracts Contracts between server and layered JDO implementation Java Data Objects 11

Roles and Scenarios Roles: JDO Vendor expert in technology related to specific data store, provides JDO implementation requires EIS vendor to implement J2EE Connector Architecture JDO role: synchronization adapter to connector architecture Connector Provider typically vendor of EIS or data store, must satisfy resource adapter interface Connector: separate component, supplied by JDO/EIS vendor or 3rd party Application Server Vendor provides implementation of J2EE compliant application server typically OS/middleware/database vendor role usually same as that of Container Provider Container Provider container provides components with services of managed server platform Java Data Objects 12

Roles and Scenarios, continued Application Component Provider provides application functionality JDO transparent components: typically helper classes JDO non-transparent components: direct users of JDO API Application Assembler takes jar files from application providers, produces jars with deployment descriptions Deployer configures assembled components into operating environment defines security roles, transactions and connection pooling protocols System Administrator configuration and administration of multiple containers, resource adapters, EISs... Java Data Objects 13

Roles and Scenarios, continued Scenario: Embedded calendar management system Java Data Objects 14

Roles and Scenarios, continued Scenario: Enterprise Calendar Manager Java Data Objects 15

Life Cycle of JDO Instances JDO Instance transient: no difference in behavior compared to unenhanced class persistent: tracks changes, preserves transactional integrity transitions among various states until garbage collected dirty instance - inconsistent with data store transactional transient instances (optional) persistent nontransactional instances (optional) Persistent instance environment with PersistenceManager reference to StateManager JDO State Manager maintains state changes of JDO Instance interfaces with PersistenceManager to manage data store values Java Data Objects 16

Life Cycle of JDO Instances, cont. JDO Identity extends Java concepts of identity/equality preserve application s implementation of equality ensure only one instance associated with PersistenceManager representing persistent state of data store object defines object identity different from Java object identity and application equality, represented via object id, fixed at enhancement time Application identity primary key, managed by application, enforced by data store Data store identity managed by data store, not tied to any instance values Non-data store identity managed by implementation to guarantee uniqueness in JVM only Java Data Objects 17

Life Cycle of JDO Instances, cont. Life Cycle States Data Store Transactions (required) Transient (no object id, transaction boundaries, exceptions) Persistent-new (result of makepersistent, assigned JDO identity) Persistent-dirty (changed in transaction) Hollow (data store values not present in instance) Persistent-clean Persistent-deleted (result of deletepersistent) Persistent-new-deleted (newly made, deleted in current transaction) Nontransactional (optional) Persistent-nontransactional Transactional transient (optional) Transient-clean Transient-dirty Java Data Objects 18

Life Cycle of JDO Instances, cont. JDO Instance State Transitions Java Data Objects 19

The Persistent Object Model Overview classes highly interconnected small number of instances at a time transparent data access required instances instantiated when following references Goals support all Java supported field types support all class/field modifiers allow all user-defined classes to be persistence-capable allow some system-defined classes to be persistence-capable Java Data Objects 20

The Persistent Object Model, cont. Architecture persistence capable classes (independent on inaccessible/remote objects) persistence incapable classes (java.lang, java.io, etc. unless specified) First Class Objects persistence capable classes, have identity stored in data store with associated Second Class Object only one instance representing FCO managed by the same PM Second Class Objects no JDO identity, track changes made to them & report to FCOs stored only as part of FCO, Java identity lost with FCO flush Arrays stored only as part of FCO, no JDO identity, Java identity lost with FCO flush Primitives stored only as part of FCO, no Java/data store identity Java Data Objects 21

PersistenceCapable Public interface implemented by classes managed by PersistenceManager allows JDO implementation to examine & manage instances JDO Enhancer modifies classes prior to loading into runtime adds code to implement PersistenceCapable methods recommended approach: use class JDOHelper PersistenceCapable PersistenceManager jdogetpersistencemanager(); void jdomakedirty (String fieldname); Object jdogetobjectid(); Object jdogetobjectid(); boolean jdoispersistent(); Object jdogetobjectid(); boolean jdoisdeleted(); boolean jdoisnew(); Java Data Objects 22

Instance Callbacks InstanceCallbacks interface required by classes including derived fields executed by PersistenceManager must be explicitly declared Methods void jdopostload(); initialization of non-persistent fields, not enhanced void jdoprestore(); update data store fields affected by non-persistent fields enhanced to reflect changes to persistent fields void jdopreclear(); clear non-persistent fields & associations with other instances during transition to hollow, not enhanced Java Data Objects 23

PersistenceManagerFactory PersistenceManagerFactory class implementing the interface provided by JDO vendor provides PersistenceManager constructor[s] Instantiating PM in managed environment JNDI lookup, cast to javax.jdo.persistencemanagerfactory call PMF s getpersistencemanager Instantiating PM in non-managed environment lookup + call as above construction & configuration of PersistenceManagerFactory + call direct construction of PersistenceManager (vendorspecific) ConnectionFactory in managed environment implements javax.resource Java Data Objects 24

PersistenceManager Overview primary interface for JDO aware componets methods for managing persistent instances factory for Query interface Goals no change to applications when changing vendors use in managed and non-managed environments without changes Provides cache & extent management ObjectId, JDO identity & life cycle management Query & Transaction factory interfaces Java Data Objects 25

Conclusion Topics not covered (by me) Transactions, Connections & Query Enterprise Java Beans JDO Exceptions & XML Metadata Portability guidelines JDO Reference enhancer Looks interesting and well thought out (after brief reading :) Lack of experience did not allow deeper analysis Complicated enough for the unvary to get lost Still some topics on TODO list Java Data Objects 26