Eclipse Persistence Services The Full Monty

Similar documents
Introducing EclipseLink: The Eclipse Persistence Services Project

ECLIPSE PERSISTENCE PLATFORM (ECLIPSELINK) FAQ

TopLink Grid: Scaling JPA applications with Coherence

The Evolution of Java Persistence

High Performance Persistence with EclipseLink

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Teneo: Integrating EMF & EclipseLink

EclipseLink. Solutions Guide for EclipseLink Release 2.6. June Beta Draft

Fast Track to EJB 3.0 and the JPA Using JBoss

Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13

CO Java EE 6: Develop Database Applications with JPA

Web Application Development Using JEE, Enterprise JavaBeans and JPA

Building Java Persistence API Applications with Dali 1.0 Shaun Smith

Web Application Development Using JEE, Enterprise JavaBeans and JPA

CO Java EE 7: Back-End Server Application Development

Polyglot Persistence. EclipseLink JPA for NoSQL, Relational, and Beyond. Shaun Smith Gunnar Wagenknecht

Efficient Object-Relational Mapping for JAVA and J2EE Applications or the impact of J2EE on RDB. Marc Stampfli Oracle Software (Switzerland) Ltd.

How To Get Database Schema In Java Using >>>CLICK HERE<<<

Java- EE Web Application Development with Enterprise JavaBeans and Web Services

Java EE 7: Back-End Server Application Development

Call: JSP Spring Hibernate Webservice Course Content:35-40hours Course Outline

"Charting the Course... Mastering EJB 3.0 Applications. Course Summary

Model Driven Development with EMF and EclipseLink (experiences in MDD and generating user interfaces)

foreword to the first edition preface xxi acknowledgments xxiii about this book xxv about the cover illustration

Understanding Impact of J2EE Applications On Relational Databases. Dennis Leung, VP Development Oracle9iAS TopLink Oracle Corporation

Developing Applications with Java EE 6 on WebLogic Server 12c

TOPLink for WebLogic. Whitepaper. The Challenge: The Solution:

Dali JPA Tools Project Graduation Review

Java EE Architecture, Part Three. Java EE architecture, part three 1(57)

JVA-163. Enterprise JavaBeans

Java Enterprise Edition

1Z Oracle. Java Enterprise Edition 5 Enterprise Architect Certified Master

Copyright Oracle Corporation and VMware Inc, Enterprise Modules Project (Gemini) Proposal

Enterprise JavaBeans, Version 3 (EJB3) Programming

Deccansoft Software Services. J2EE Syllabus

Hands-on Development of Web Applications with Java EE 6

Oracle TopLink. Developer s Guide, Volume 4 10g ( ) B September 2006 Understanding Non-Relational Mappings

Enterprise Java Development using JPA, Hibernate and Spring. Srini Penchikala Detroit JUG Developer Day Conference November 14, 2009

Migrating a Classic Hibernate Application to Use the WebSphere JPA 2.0 Feature Pack

JavaEE.Next(): Java EE 7, 8, and Beyond

object/relational persistence What is persistence? 5

What is it? What does it do?

Spring & Hibernate. Knowledge of database. And basic Knowledge of web application development. Module 1: Spring Basics

Java EE Architecture, Part Three. Java EE architecture, part three 1(69)

Implementing a Web Service p. 110 Implementing a Web Service Client p. 114 Summary p. 117 Introduction to Entity Beans p. 119 Persistence Concepts p.

Enterprise Features & Requirements Analysis For EJB3 JPA & POJO Persistence. CocoBase Pure POJO

Introduction to Web Application Development Using JEE, Frameworks, Web Services and AJAX

<Insert Picture Here> Upgrading from Oracle Application Server to Oracle WebLogic Server

purequery Deep Dive Part 2: Data Access Development Dan Galvin Galvin Consulting, Inc.

Oracle - Developing Applications for the Java EE 7 Platform Ed 1 (Training On Demand)

Leverage Rational Application Developer v8 to develop Java EE6 application and test with WebSphere Application Server v8

Eclipse SOA Tooling Platform: Project Overview. An Overview of the Eclipse STP (SOA Tooling Platform) Project

The Galilean Moons of Eclipse

SUN Sun Certified Enterprise Architect for J2EE 5. Download Full Version :

Integrating Legacy Assets Using J2EE Web Services

DATA ACCESS TECHNOLOGIES FOR JAVA GENERAL STUDY

Oracle Developer Day

Lightweight J2EE Framework

Introduction. Enterprise Java Instructor: Please introduce yourself Name Experience in Java Enterprise Edition Goals you hope to achieve

1 Markus Eisele, Insurance - Strategic IT-Architecture

ORACLE WEBLOGIC SERVER 10g R3 ENTERPRISE EDITION

Gemini DBAccess Release Review February 2013

Oracle Fusion Middleware

Java Persistence API. Patrick Linskey EJB Team Lead BEA Systems Oracle

Contents at a Glance. vii

Apps Exception Problem Building Schema Jdeveloper

Dali Java Persistence Tools

WebSphere 4.0 General Introduction

Web Application Development Using Spring, Hibernate and JPA

From business need to implementation Design the right information solution

Oracle ADF: The technology behind project fusion. Lynn Munsinger Principal Product Manager Application Development Tools Oracle Corporation

Chapter 1 Introducing EJB 1. What is Java EE Introduction to EJB...5 Need of EJB...6 Types of Enterprise Beans...7

Database Binding Component User's Guide

Web Application Development Using Spring, Hibernate and JPA

The dialog boxes Import Database Schema, Import Hibernate Mappings and Import Entity EJBs are used to create annotated Java classes and persistence.

Hibernate Overview. By Khader Shaik

Object-relational mapping tools and Hibernate

CMP 436/774. Introduction to Java Enterprise Edition. Java Enterprise Edition

INTRODUCTION TO COMPONENT DESIGN IN JAVA EE COMPONENT VS. OBJECT, JAVA EE JAVA EE DEMO. Tomas Cerny, Software Engineering, FEE, CTU in Prague,

Java EE Architecture, Part Three. Java EE architecture, part three 1(24)

Shale and the Java Persistence Architecture. Craig McClanahan Gary Van Matre. ApacheCon US 2006 Austin, TX

Architect Exam Guide. OCM EE 6 Enterprise. (Exams IZO-807,1ZO-865 & IZO-866) Oracle Press ORACLG. Paul R* Allen and Joseph J.

Supports 1-1, 1-many, and many to many relationships between objects

Java EE Application Assembly & Deployment Packaging Applications, Java EE modules. Model View Controller (MVC)2 Architecture & Packaging EJB Module

Courses For Event Java Advanced Summer Training 2018

Web Application Development Using Spring, Hibernate and JPA

Not just an App. Server

Migrating traditional Java EE applications to mobile

Index. attributes, visual modeling of, , 565, 566, 567, 568 authentication, Authorization Constraint wizard, , 396

ORACLE DATA SHEET KEY FEATURES AND BENEFITS ORACLE WEBLOGIC SUITE

Putting Oracle Database 11g to Work for Java. Kuassi Mensah Group Product Manager, Java Platform Group db360.blogspot.com

Oracle SOA Suite 12c: Build Composite Applications. About this course. Course type Essentials. Duration 5 Days

Oracle Corporation

<Insert Picture Here> Future<JavaEE>

IBM WebSphere Application Server 8. Java EE 6 Feature Packs

X100 ARCHITECTURE REFERENCES:

Java Training Center, Noida - Java Expert Program

Oracle SOA Suite 11g: Build Composite Applications

Generating A Hibernate Mapping File And Java Classes From The Sql Schema

Table of Contents. I. Pre-Requisites A. Audience B. Pre-Requisites. II. Introduction A. The Problem B. Overview C. History

Transcription:

Eclipse Persistence Services The Full Monty Doug Clarke Principal Product Manager, Oracle TopLink Eclipse Persistence Services Project co-lead douglas.clarke@oracle.com Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 1

A little about Me Principal Product Manager Oracle TopLink With product for 10 years Product Developer Consultant Involved daily with development and customers Co-Lead Eclipse Persistence Services Project Frequent speaker at conferences and JUGs primarily on persistence related topics Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 2

What you will learn What the Eclipse Persistence Services Project is How this project can be used and its benefits Why you will want to use this project How you can get involved Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 3

What is Eclipse? Eclipse is an open source community Eclipse is more then just an IDE Equinox (OSGi), Rich Client Platform (RCP), Higgins (Trust Framework), Incubating Maya (Deployment Framework) Persistence Services Project (EclipseLink) Proposals SOA, Rich Server Platform, Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 4

Why Eclipse? Eclipse has a strong and vibrant community with an effective governance model Good reputation for quality Interest from within the Eclipse ecosystem Oracle has had a positive experience with its existing participation in Eclipse projects Projects lead by Oracle: Dali, BPEL, JSF Other Oracle contributions: WTP and DTP Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 5

Eclipse Persistence Services Eclipse runtime project Nicknamed EclipseLink Currently Incubating in Technology Project Comprehensive EclipseLink JPA: Object-Relational EclipseLink MOXy: Object-XML EclipseLink SDO: Service Data Objects EclipseLink DBWS: Database Web Services EclipseLink EIS: Non-Relational using JCA Defining blueprints for OSGi persistence services Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 6

Java SE, Java EE, SCA, Spring, OSGi JPA MOXy SDO DBWS EIS Eclipse Persistence Services (EclipseLink) JDBC JCA Relational Databases XML Packaged Apps Legacy Systems Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 7

Oracle TopLink Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 8

Importance First comprehensive open source persistence solution Object-Relational and much more Based upon product with 12 years of commercial usage Shared infrastructure Easily share the same domain model with multiple persistence technologies Leverage metadata for multiple services Important part of the Eclipse Ecosystem Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 9

EclipseLink JPA JPA 1.0 compliant implementation Java EE, Java SE, Web, Spring, and OSGi Any JDBC/SQL compliant database Extensible and pluggable Schema generation Key infrastructure: Caching, Locking, Query Framework, Mapping, plus many valuable advanced features Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 10

EclipseLink Caching Entity caching L2 shared across transactions/users Coordination in a clustered deployment Application specific configuration Cache isolation: per client (EM) or shared Cache Type and Size: Weak, Soft-Weak, Full, None Expiration/Invalidation Time to live, Time of day, API Coordination (cluster-messaging) Messaging: JMS, RMI, CORBA, RMI-IIOP, Mode: SYNC, SYNC+NEW, INVALIDATE, NONE Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 11

Caching Architecture EntityManager EntityManager Factory UnitOfWork Session TX Cache Isolated Cache Server Shared Cache Cache Coordination JMS (MDB) RMI CORBA IIOP Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 12

Configuring the Cache Default: objects read are cached and trusted Configuration by entity type important Volatility of data Shared usage of data Configuration Parameters Cache isolation, type, size, expiry, coordination Refreshing By query (use-case) or descriptor (always) Locking is the only way to avoid potential data corruption in concurrent write scenarios Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 13

Locking Prevent data corruption!!! Java Developers think of locking at the object level Databases may need to manage locking across many applications EclipseLink is able to respect and participate in locks at database level Optimistic: Numeric, Timestamp, All fields, Selected fields, Changed field Pessimistic Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 14

Query Framework Queries can be defined using Entity Model: JPQL, Expressions, Query-byexample Database: SQL, Stored Procedures Customizable Locking, Cache Usage, Refreshing Optimizations: Joining, Batching, parameter binding Result shaping/conversions Static or Dynamic Stored Procedure support Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 15

EclipseLink JPA Extensions Extensions supported through annotations and XML Mapping @BasicMap, @BasicCollection, @PrivateOwned, @JoinFetch @Converter, @TypeConverter, @ObjectTypeConverter @Cache type, size, isolated, expiry, refresh, cache usage, coordination Cache usage and refresh query hints @NamedStoredProcedureQuery IN/OUT/INOUT parameters, multiple cursor results Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 16

EclipseLink JPA Extensions Locking Non-intrusive policies @OptimisticLocking Pessimistic query hints JDBC Connection Pooling Logging: Diagnostics, SQL, Debugging Weaving for lazy fetch and change tracking Dynamic and Static Customization Entity Descriptor: @Customizer, @ReadOnly Session Customizer Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 17

Mapping Extensions @Entity @Cache(type=SOFT_WEAK, coordinationtype=send_object_changes) @OptimisticLocking(type=CHANGED_COLUMNS) @Converter(name= money, converterclass=moneyconverter.class) public class Employee { @Id private int id; private String name; @OneToMany(mappedBy= owner ) @PrivateOwned private List<PhoneNumbers> phones; } @Convert( money ) private Money salary Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 18

Database Platform Native SQL (dialect) support with custom operators Stored Procedure & Function Extensible Advanced Data Types support (Struct) Database Security Oracle DB s VPD/OLS and Proxy Authentication Configurable value return from write Supported platforms (default = Auto) MySQL, Derby, Oracle, DB2, Sybase, SQLServer, TimesTen, PostgreSQL, SQLAnyWhere, HSQL, Informix, Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 19

Server Platform Simplified configuration and mediator for host container environment Enables Direct JTA integration Data Source/JDBC connection un-wrapping JMX MBean deployment Logging integration Current Server Platforms SunAS/GlassFish, OracleAS/OC4J, WLS, WAS, JBoss Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 20

Performance and Tuning Highly configurable and tunable Principle: minimize and optimize database calls Enable application specific tuning Flexibility allows efficient business models and relational schemas to be used Leverages underlying performance tuning features Java, JDBC and the underlying database technology Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 21

EclipseLink JPA Config JPA (portable) Persistence.xml with EclipseLink properties Mapping: Annotations and/or orm.xml Query hints EclipseLink Sessions Configuration (sessions.xml) Mapping using XML or Code EclipseLink JPA JPA + EclipseLink configurations options EclipseLink annotations Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 22

EclipseLink MOXy Provides complete Object-XML mapping Allows developers to work with XML as objects Efficiently produce and consume XML Document Preservation Supports Object-XML standard - JAXB Provides additional flexibility to allow complete control on how objects are mapped domain model XML Data Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 23

EclipseLink MOXy Benefits Rich set of mappings providing complete control and flexibility to map objects to any XSD Direct, composite object, composite collection, inheritance, positional, path, transformation. Development Approaches Model + Annotations XSD XSD Model + Annotations Model + Mappings(Annotations or XML) Supports any JAXP compliant parser SAX, DOM, StAX Visual Mapping support using Workbench Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 24

EclipseLink MOXy: JAXB JAXBContext ctx = JAXBContext.newInstance(classes); Marshaller marshaller = ctx.createmarshaller(); Customer customer = new Customer(); customer.setfirstname("william"); customer.setlastname("gibson"); marshaller.marshal(customer, System.out); jaxb.properties: javax.xml.bind.context.factory = org.eclipse.persistence.jaxb.jaxbcontextfactory Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 25

DEMO EclipseLink MOXy (JAXB) Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 26

EclipseLink DBWS Simplified and efficient access to relational data through Web Services Minimal configuration with development utilities to retrieve metadata and generate/package Web Service Developers can fully customize the database access and XML mapping of the data Ideal for usage within SOA/SCA Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 27

EclipseLink DBWS OR-Map (XML) OX-Map (XML) Web Service DBWS Specification ANT Java XR Service (XML) EclipseLink DBWS Data Source import definitions RDBMS development runtime Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 28

EclipseLink SDO What can you do? Marshall/Unmarshall objects to/from XML Define Types/Properties programmatically or derive from XSD Generate JavaBean classes from XSD Advanced mapping support for greater flexibility Why would you use it? Schema/Structure unknown at compile time Declarative metadata based tools/frameworks XML-centric applications, need open content support Dynamic content user interfaces Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 29

DEMO EclipseLink SDO Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 30

EclipseLink EIS Provide persistence support for nonrelational data stores using Java EE Connector Architecture (JCA) Mapping interaction inputs and outputs to persistent domain model XML mapping leveraging EclipseLink MOXy Common Client Interface (CCI) mapping Visual mapping Workbench support Out of the box support for: MQSeries, OracleAQ, Sun JCA, XML Files Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 31

EclipseLink and OSGi Work with OSGi expert group to define OSGi persistence services blueprint Deliver EclipseLink as OSGi bundle(s) Show through examples how to leverage within an OSGi solution Address technical challenges as a community Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 32

Combining Services Metadata based approach allows the same domain model to be mapped with multiple persistence services Supports usage within Web Services/SOA/SCA Domain model can be shared between persistence services (JPA, MOXy, EIS) Transformations are bidirectional: Unmarshall XML to objects and then persist Marshall persistent objects to XML Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 33

Common Domain Model Schema-1 EclipseLink MOXy EclipseLink JPA Schema-3 EclipseLink MOXy domain model EclipseLink JPA Schema-2 Schema-4 Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 34

EclipseLink and Spring EclipseLink JPA Container Template EclipseLink Native ORM Template EclipseLink MOXy Direct, Spring WS, Spring Remoting, and many more possibilities Spring Batch, Spring OSGi, Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 35

EclipseLink JPA in Spring @Repository @Transactional public class EntityManagerClinic implements Clinic { @PersistenceContext private EntityManager em; public Collection<Owner> findowners(string lastname) throws DataAccessException { Query query = em.createnamedquery( Employee.findOwners"); query.setparameter("lastname", lastname + "%"); return query.getresultlist(); } Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 36

DEMO Using EclipseLink with the Spring Framework Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 37

EclipseLink in the Eclipse Ecosystem Provide an Eclipse persistence solution easily consumable by any project Storage of metadata in RDBMS, XML, EIS XML Messaging infrastructure Eclipse Projects Dali JPA Tooling Project Teneo to use EclipseLink for EMF model persistence Maya for storage of deployment configuration SOA Project for EclipseLink SDO Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 38

Where are we going? Delivery of initial 0.1-incubation milestone Build and testing processes Initial contribution functional Spring Framework support Specifications: JAXB 2.0, SDO 2.1, JPA 2.0 OSGi packaging and usage examples Database Web Services (DBWS) Data Access Service (DAS) - SDO with JPA Simplified DataMap Access and Dynamic Persistence Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 39

How can you get involved? Users The 0.1-incubation milestone will be available soon Try it out and provide feedback File bug reports and feature requests Contributors Contribute to roadmap discussions Bug fixes Committers Very interested in growing committer base Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 40

EclipseLink Summary First comprehensive Open Source Persistence solution EclipseLink JPA: Object-Relational EclipseLink MOXy: Object-XML EclipseLink SDO: Service Data Objects EclipseLink DBWS: Database Web Services EclipseLink EIS: Non-Relational using JCA Mature and full featured Get involved Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 41

More Information www.eclipse.org/eclipselink Newsgroup: eclipse.technology.eclipselink Wiki: wiki.eclipse.org/index.php/eclipselink Blogs Committer Team blog: eclipselink.blogspot.com My blog: java-persistence.blogspot.com Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 42

Q A & Doug Clarke: Eclipse Persistence Services, The Full Monty Slide 43