Slides:



Advertisements
Similar presentations
V 6, Mats Strandberg ORM With Hibernate.
Advertisements

Introduction to NHibernate By Andrew Smith. The Basics Object Relation Mapper Maps POCOs to database tables Based on Java Hibernate. V stable Generates.
ON RULES, PROCEDURES, CACHING AND VIEWS IN DATA BASE SYSTEM by M. Stonebraker, A. Jhingran, J. Goh, and S. Potamianos UC Berkley Presented by Zhou Ji.
Connecting to Databases. relational databases tables and relations accessed using SQL database -specific functionality –transaction processing commit.
Java and Databases PPJDG, May 2004 Chris Smith, MindIQ.
Persistence Jim Briggs 1. 2 Database connectivity: JDBC Java Database Connectivity An API for connecting Java programs (applications, applets and servlets)
Unveiling ProjectWise V8 XM Edition. ProjectWise V8 XM Edition An integrated system of collaboration servers that enable your AEC project teams, your.
Integrating SOA and the Application Development Framework Shaun O’Brien Principal Product Manager – Oracle JDeveloper / ADF.
June 1999 EJB1 EJB and CHAIMS Dorothea Beringer Enterprise Java Beans and how to build a CHAIMS infrastructure using the EJB paradigm.
Safe Query Objects: Statically Typed Objects as Remotely Executable Queries By: William Cook & Siddhartha Rai ICSE 2005.
OpenCCM: The Open CORBA Components Platform OSMOSE WP3 CCM Meeting 14th November 2003, LIFL, Lille, France Philippe Merle Jacquard Project.
Java Data Object Che-Rung Lee. JDO Objectives Transparent persistence Range of implementations  embedded (J2ME)  two tier (J2SE)  enterprise (J2EE,
By: Devesh Sharma.  Why Cloud Computing? ◦ Traditional Business Applications  Expensive  Complicated  Difficult to manage  Idea behind Cloud Computing.
An Introduction to Hibernate Matt Secoske
Spring Roo CS476 Aleksey Bukin Peter Lew. What is Roo? Productivity tool Allows for easy creation of Enterprise Java applications Runs alongside existing.
Rice KRAD Data Layer JPA Design Eric Westfall July 2013.
Creating of Rich Client Applications using NetBeans 6 and Java Swing Miroslav Nachev.
M1G Introduction to Programming 2 4. Enhancing a class:Room.
INTRODUCING SCA Byungwook Cho Nov.2007.
Agenda What is Hibernate Spring Integration Questions Overview
PowerDesigner 与对象建模. 2 Why Using UML? Visually define and communicate the structure and behavior of an application Represent systems using Object-Oriented.
Entity Beans BMP Celsina Bignoli
/11/2003 C-JDBC: a High Performance Database Clustering Middleware Nicolas Modrzyk
OpenCCM: The Open CORBA Components Platform 3rd ObjectWeb Conference 20th November 2003, INRIA Rocquencourt, France Philippe Merle INRIA.
Enterprise JavaBeans. What is EJB? l An EJB is a specialized, non-visual JavaBean that runs on a server. l EJB technology supports application development.
Introduction to J2EE Architecture Portions by Kunal Mehta.
Java Transaction API Sean C. Sullivan
© 2006 IBM Corporation IBM WebSphere Portlet Factory Architecture.
JOnAS 3.2 July 1, 2003 François Exertier.
1 An Approach to Intra-Vehicular Data Registration and Management Presented by Mr. William Pritchett DCS Corporation 1330 Braddock Place Alexandria, VA.
Dali JPA Tools. About Dali Dali JPA Tools is an Eclipse Web Tools Platform sub-Project Dali 1.0 is a part of WTP 2.0 Europa coordinated release Goal -
1 LIBeLIS JDO verleiht Flügel Enterprise Information Access Scalable, robust JDO solutions « JDO: Just Do Objects ! » Alexander v. Zitzewitz
1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.
Designing a Persistence Framework With Patterns
JBoss at Work Databases and JBoss Chapter 4 Jeff Schmitt October 26, 2006.
Chapter 38 Persistence Framework with Patterns 1CS6359 Fall 2011 John Cole.
0 0 Thread Management in Application Servers Wednesday, October 11, 2006 Nicolas DOLET Philippe MERLE
Abstraction of Transaction Demarcation in Component-Oriented Middleware Romain Rouvoy - Philippe Merle Jacquard INRIA Project LIFL –
© 2002 IBM Corporation Confidential | Date | Other Information, if necessary June, 2011 Made available under the Eclipse Public License v Mobile.
Dream A Fractal-based communication framework ObjectWeb Architecture Meeting July, 8th 2004 M. Leclercq, V. Quéma, J.-B. Stefani Sardes.
Grid Services I - Concepts
Selena Extension Christian Brand Eckart Langhuth Matthias Metzler
July 7-11, 2003  Portland, Oregon JDO (Java Data Objects) What It Is And Why It Matters Ron Hitchens JavaPolis.
MCS 270 Spring 2014 Object-Oriented Software Development.
Introducing Allors Applications, Tools & Platform.
Database Architecture Course Orientation & Context.
Java Beans. Definitions A reusable software component that can be manipulated visually in a ‘builder tool’. (from JavaBean Specification) The JavaBeans.
1 Nov 29, 2005 Object Relational Mapping Frameworks Wiene Höweler.
OpenCCM: Status and Work plan Dr. Philippe Merle LIFL - INRIA ObjectWeb Architecture Meeting, Grenoble, 21 – 22.
Java Persistence API part 1 INFORMATICS ENGINEERING – UNIVERSITY OF BRAWIJAYA Eriq Muhammad Adams J
Java Programming: Advanced Topics 1 Enterprise JavaBeans Chapter 14.
Enterprise JavaBeans: Fundamentals. EJB Fundamentals(c)CDAC(Formerly NCST)2 Contents Introduction Technology Overview EJB Architecture EJB Specification.
Fundamentals of MyBATIS
Module 5: Managing Content. Overview Publishing Content Executing Reports Creating Cached Instances Creating Snapshots and Report History Creating Subscriptions.
Using Datastore with JDO 1. Setting up DataNucleus Access Platform 2. JDO class enhancement 3. POJOs and JDO Annotations 4. PersistencyManager and its.
OOPSLA Lab1 Chapter 7 Java Binding Prof. Hyoung-Joo Kim OOPSLA Lab. Dept. of Computer Engineering Seoul National University.
JDBC.
Introduction  Model contains different kinds of elements (such as hosts, databases, web servers, applications, etc)  Relations between these elements.
Don't Know Jack About Object-Relational Mapping?
Lecture 7: Android Services
Open Source distributed document DB for an enterprise
Chapter 12 Outline Overview of Object Database Concepts
Presented by Jinpeng Zhou
Adaptive Code Umamaheswaran Senior Software Engineer
Corso di “Sviluppo di applicazioni Web”
Objectives In this lesson, you will learn to:
Knowledge Byte In this section, you will learn about:
Developing and testing enterprise Java applications
Knowledge Byte In this section, you will learn about:
SDC BL and Titan overview
Presentation transcript:

Speedo presentation - 2 Plan Speedo: the project view JDO Model  By the example  The API Speedo: the implementation  Architecture  The generator (enhancer)

Speedo: The project view

Speedo presentation - 4 Speedo, What is it ? Implementation of the JDO 2.0 specification http// open source community built on top of:  Jorm: mapping of objects into a persistent support  Medor: query framework  Perseus: persistence framework Use Fractal, Julia, ASM, Monolog, MX4J Leader: France Telecom R&D Project responsible: S.Chassande-Barrioz

Speedo presentation - 5 Speedo in Objectweb SpeedoEJB CMP2 Cache (Perseus) Concurrency (Perseus) Transaction (JCA) Mapping (JORM) RDBODBLDAP Query (MEDOR) Container File Frame- work Data support Application = { Components }

Speedo presentation - 6 Speedo: features (1/2) JDO 2.0  Query aggregate  Detach/attach mechanism Byte code enhancement (ASM) Data support: relational databases only Support legacy database Various concurrency management:  By Speedo itself: Optimistic, pessimistic or Mutex  Delegated to the database  Granularity: Collection | element L2 Cache (persistent objects)  replacement policy: LRU | MRU | FIFO | …  Configuration per classes

Speedo presentation - 7 Speedo: Features (2/2) Lazy loading by default but fetch group (JDO2) Data prefetching on query and collection loading  Avoid useless I/O  increase the performance Fractal  component architecture  JMX Component pooling  Avoid the creation of java objects  Avoid the creation and the fractal component binding Jorm/Medor advantages  Legacy support  Other than relationnal data base  Futur: Distribution / federation

Speedo presentation - 8 Speedo: tools EclipseJDO Eclipse plugin for speedo.properties PONEI: Eclipse plugin for nagivate and edit JDO persistent model  For JDO developer Speedo documentation as Eclipse Plugin Ant task for enhancement step HTTP console for administration/monitoring

Speedo presentation - 9 Work plan 3Q2005:  Several inheritance mappings (horizontal & vertical)  JDO 2: features – Standard mapping in.jdo/.orm – Interface 3Q2005:  Support EJB 3.0 API / JOnAS CMP3 2006:  Distributed concurrency: Perseus on JGroups  Distributed cache: – Perseus, Oscache,Tangosol, gigaspaces

The JDO Model

Speedo presentation - 11 JDO: What is it ? SUN specification Persistence of java objects JDO Data source Persistent object

Speedo presentation - 12 JDO: the principles (1/4) Persistent descriptor =.jdo file  Which classes are persistent ?  Which fields are persistent ?  Vendor extension for the mapping

Speedo presentation - 13 JDO: the principles (2/4) Explicit persistence management  makePersistent(Object o)  deletePersistent(Object o)  getObjectById(Object oid)  … Implicit persistence A a1 = …; //a persistent object B b1 = … ; // a non persistent object a1.setMyB(b1); //Now the ‘b1’ instance is persistent

Speedo presentation - 14 JDO: the principles (3/4) User transaction demarcation  Begin  Commit | rollback queries built by a programatic way

Speedo presentation - 15 JDO: the principles (4/4) PersistenceManagerFactory  Represents a data source  Provides PersistenceManager instance PersistenceManager  Helper to manage the persistence of objects makePersistent, deletePersistent, …  Linked to one PMF  Linked to one transaction

Speedo presentation - 16 JDO: Example (1/4) public class Toto { PersistenceManagerFactory pmf; public void initJDO(String fileName) { Properties p = new Properties(); p.load(new FileInputStream(fileName)); pmf = JDOHelper.getPersistenceManagerFactory(p); } Load properties of JDO driver from a properties file (speedo.properties) Use JDO tool to instanciate/find a PersistenceManagerFactory with properties.

Speedo presentation - 17 JDO: Example (2/4) public class Department { String name; Map emps = new HashMap(); public Employee createEmployee(String en) { PersistenceManager pm = pmf.getPersistenceManager(); pm.currentTransaction().begin(); Employee e = new Employee() e.name = en; e.dept = this; emps.put(en, e); pm.makePersistent(e); pm.currentTransaction().commit(); pm.close(); } Fetch PM Transaction begin Make persistent the new Employee transaction commit release the pm

Speedo presentation - 18 JDO: Example (3/4) public Employee removeEmployee(String en) { Employee e = emps.get(en); if (e == null) return null; PersistenceManager pm = pmf.getPersistenceManager(); pm.currentTransaction().begin(); pm.deletePersistent(e); pm.currentTransaction().commit(); pm.close(); } Fetch PM Transaction begin Remove the Employee transaction commit release the pm

Speedo presentation - 19 JDO: Example (4/4) public Collection getPoorEmployee(int salary) { PersistenceManager pm = pmf.getPersistenceManager(); pm.currentTransaction().begin(); Query query = pm.newQuery(Employee.class); query.declareParameters("Float s"); query.setFilter("(salary < s)"); Collection col = new ArrayList( (Collection) query.execute(new Float(1500.0))); pm.currentTransaction().commit(); pm.close(); return col; } new query over the Employee class declare a parameter declare the filter Execute the query with the parameter

Speedo: The implementation

Speedo presentation - 21 The Speedo component Persistence Manager Factory Persistence Manager Pool PersistenceManagerFactory PoolResource ProxyManager Speedo = One fractal composite component

Speedo presentation - 22 Speedo lauching Two ways:  Use the Speedo component (fractal environnement)  Use the org.objectweb.speedo.Speedo class – to launch julia, – to instanciate the component Speedo Application Interface PersistenceManagerFactory Simple classThe component

Speedo presentation - 23 PersistenceManagerFactory : the component PMF = one data source = one mapper Pool of PersistenceManager instance Persistence Manager Factory Mapper PooMatchFactory PersistenceManagerFactory ProxyManagerSwitch Pool PMapper PMS Pool

Speedo presentation - 24 The PersistenceManager component Transaction ProxyMan ager ProxyManagerSwitch SpeedoTransactional PersistenceManager SpeedoQueryManager CacheManager Pool ProxyManager PoolMatchFactory Pool QueryManager SpeedoTransaction QueryManager CacheManager PersistenceManagerFactory ProxyManager Switch TransactionalPersistence Manager

Speedo presentation - 25 Pool / Fractal component Why pooling some fractal components  Remove the cost of the components creation and binding  PersistenceManager / Transaction

Speedo presentation - 26 The Speedo container My Container definition: code added to the application using services in order to add semantic. Speedo uses several technics:  Code generation (Velocity)  Byte code injection (ASM)  Classes merging (ASM)  One class

Speedo presentation - 27 The Speedo enhancer: overview XXXPBinding XXX XXXProxy XXX Byte code injection 1/ 2/ Jorm Generation XXXPBinding 3/ Speedo Generation XXXProxy 4/ Merging extends XXX

Speedo presentation - 28 The persistent object Persistent class (SpeedoProxy) without any field State (SpeedoAccessor) contains persistent fields Aims:  concurrency policies  Unique instance per OID (less java object creation)