SlideShare une entreprise Scribd logo
1  sur  11
Télécharger pour lire hors ligne
Java Persistence 2.0
Linda DeMichiel
Java Persistence 2.0 Specification Lead
Sun Microsystems
Java Persistence 1.0
• Standardized O/R Mapping for Java EE and Java
  SE environments
• A great start .....




                                                  2
Java Persistence 2.0
•   Expanded O/R mapping functionality
•   Expanded query language to match
•   Criteria API
•   Pessimistic locking
•   Standardized hints and properties
•   Support for validation
•   And...some needed cleanups...


                                         3
Progress to Date: Early Draft
• Expanded O/R mapping and modeling
  >   Collections of basic types and embeddables
  >   Relationships from embeddables
  >   Multiple levels of embeddables
  >   Persistent lists
  >   Real maps and ternary relationships
  >   Additional database schema mappings
      – one-to-many foreign key mappings for unidirectional relationships
      – one-to-one, many-to-one join table mappings
  > Real overlapping PK/FK modeling support
     – “derived identities”
  > Combinations of access types
  > Orphan deletion                                                     4
Progress to Date: Early Draft
• Pessimistic locking
  > At both entity and query result levels
• Standardized hints and properties
  > For locking
  > For configuration
• Simple API for interaction with provider's cache




                                                     5
Progress to Date: Public Review Draft
• Java Persistence Query Language
  > Extensions for new mapping types
  > Support for non-polymorphic queries
  > Scalar expressions in SELECT list
  > Case statements
  > INDEX, KEY, VALUE, ENTRY operators for maps and
    lists
  > Collection-valued parameters for IN expressions
  > More flexibility in subqueries
  > ...

                                                      6
Progress to Date: Public Review Draft
• Criteria API
  > Dynamic, non-string-based API
  > Supports everything that JPQL queries can do
  > Integrates with existing Query API
     – Create query definitions
     – Pass them to createQuery to create Query objects




                                                          7
Example: Criteria API
...
QueryBuilder qb =
    EntityManager.getQueryBuilder();
DomainObject customer =
    qb.createQueryDefinition(Customer.class);
DomainObject order = customer.join(“orders”);
DomainObject address = customer.join(“address”);
customer.where(address.get(“state”).equal(“CA”))
        .select(order)
        .orderBy(order.get(“quantity”).desc(),
                  order.get(“totalcost”));



                                               8
Status and Roadmap
• Public Review Draft
  > Submitted to JCP last week
  > Expected to appear in 1 - 2 weeks
  > http://jcp.org/en/jsr/detail?id=317
• Proposed Final Draft in December
  > Will target support for Validation (JSR 303)
• Final Release in June
  > As part of Java EE 6 and as standalone


Your feedback is important!
  > jsr-317-pdr-feedback@sun.com                   9
GlassFish and Java Persistence
• Java Persistence 1.0 in GlassFish v3 Prelude today
  > EclipseLink 1.0
  > Hibernate EntityManager
  > OpenJPA


• Java Persistence 2.0 RI will be provided by
  EclipseLink project
  > Will be available in GlassFish v3



                                                       10
Java Persistence 2.0
Linda DeMichiel
Sun Microsystems

Contenu connexe

Similaire à Java Persistence 2.0

Google G Data Reading And Writing Data On The Web
Google G Data Reading And Writing Data On The WebGoogle G Data Reading And Writing Data On The Web
Google G Data Reading And Writing Data On The Web
QConLondon2008
 
Google G Data Reading And Writing Data On The Web 1
Google G Data Reading And Writing Data On The Web 1Google G Data Reading And Writing Data On The Web 1
Google G Data Reading And Writing Data On The Web 1
QConLondon2008
 
Automated Performance Testing With J Meter And Maven
Automated  Performance  Testing With  J Meter And  MavenAutomated  Performance  Testing With  J Meter And  Maven
Automated Performance Testing With J Meter And Maven
PerconaPerformance
 
Frank Mantek Google G Data
Frank Mantek Google G DataFrank Mantek Google G Data
Frank Mantek Google G Data
deimos
 
Applications of the REST Principle
Applications of the REST PrincipleApplications of the REST Principle
Applications of the REST Principle
elliando dias
 

Similaire à Java Persistence 2.0 (20)

Net Beans61 Ide
Net Beans61 IdeNet Beans61 Ide
Net Beans61 Ide
 
Application Architecture Trends
Application Architecture TrendsApplication Architecture Trends
Application Architecture Trends
 
Google G Data Reading And Writing Data On The Web
Google G Data Reading And Writing Data On The WebGoogle G Data Reading And Writing Data On The Web
Google G Data Reading And Writing Data On The Web
 
Google G Data Reading And Writing Data On The Web 1
Google G Data Reading And Writing Data On The Web 1Google G Data Reading And Writing Data On The Web 1
Google G Data Reading And Writing Data On The Web 1
 
New Features of Java7 SE
New Features of Java7 SENew Features of Java7 SE
New Features of Java7 SE
 
Slice: OpenJPA for Distributed Persistence
Slice: OpenJPA for Distributed PersistenceSlice: OpenJPA for Distributed Persistence
Slice: OpenJPA for Distributed Persistence
 
Automated Performance Testing With J Meter And Maven
Automated  Performance  Testing With  J Meter And  MavenAutomated  Performance  Testing With  J Meter And  Maven
Automated Performance Testing With J Meter And Maven
 
Orbitz and Spring Webflow Case Study
Orbitz and Spring Webflow Case StudyOrbitz and Spring Webflow Case Study
Orbitz and Spring Webflow Case Study
 
Frank Mantek Google G Data
Frank Mantek Google G DataFrank Mantek Google G Data
Frank Mantek Google G Data
 
Java EE 6 & GlassFish v3: Paving path for the future
Java EE 6 & GlassFish v3: Paving path for the futureJava EE 6 & GlassFish v3: Paving path for the future
Java EE 6 & GlassFish v3: Paving path for the future
 
GDSC Backend Bootcamp.pptx
GDSC Backend Bootcamp.pptxGDSC Backend Bootcamp.pptx
GDSC Backend Bootcamp.pptx
 
Rapid Development Tools for Java EE 8 [TUT2998]
Rapid Development Tools for Java EE 8 [TUT2998]Rapid Development Tools for Java EE 8 [TUT2998]
Rapid Development Tools for Java EE 8 [TUT2998]
 
Rapid development tools for java ee 8 [tut2998]
Rapid development tools for java ee 8 [tut2998]Rapid development tools for java ee 8 [tut2998]
Rapid development tools for java ee 8 [tut2998]
 
Orcale Presentation
Orcale PresentationOrcale Presentation
Orcale Presentation
 
Applications of the REST Principle
Applications of the REST PrincipleApplications of the REST Principle
Applications of the REST Principle
 
Advanced Cross-Browser Layout with Internet Explorer 8
Advanced Cross-Browser Layout with Internet Explorer 8Advanced Cross-Browser Layout with Internet Explorer 8
Advanced Cross-Browser Layout with Internet Explorer 8
 
EclipseLink JPA
EclipseLink JPAEclipseLink JPA
EclipseLink JPA
 
Karate for Complex Web-Service API Testing by Peter Thomas
Karate for Complex Web-Service API Testing by Peter ThomasKarate for Complex Web-Service API Testing by Peter Thomas
Karate for Complex Web-Service API Testing by Peter Thomas
 
Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011
 
Whats New In Spring 3.0 ?
Whats New In Spring 3.0 ?Whats New In Spring 3.0 ?
Whats New In Spring 3.0 ?
 

Plus de Eduardo Pelegri-Llopart

Plus de Eduardo Pelegri-Llopart (20)

Juggling at freenome
Juggling   at freenomeJuggling   at freenome
Juggling at freenome
 
Csumb capstone-fall2016
Csumb capstone-fall2016Csumb capstone-fall2016
Csumb capstone-fall2016
 
Digital activitymanagement
Digital activitymanagementDigital activitymanagement
Digital activitymanagement
 
Progress next iot_pelegri
Progress next iot_pelegriProgress next iot_pelegri
Progress next iot_pelegri
 
Pelegri Desarrollando en una nueva era de software
Pelegri   Desarrollando en una nueva era de software Pelegri   Desarrollando en una nueva era de software
Pelegri Desarrollando en una nueva era de software
 
Market trends in IT - exchange cala - October 2015
Market trends in IT - exchange cala - October 2015Market trends in IT - exchange cala - October 2015
Market trends in IT - exchange cala - October 2015
 
The impact of IOT - exchange cala - 2015
The impact of IOT - exchange cala - 2015The impact of IOT - exchange cala - 2015
The impact of IOT - exchange cala - 2015
 
IOT - Presentation to PEP @ Progress
IOT - Presentation to PEP @ ProgressIOT - Presentation to PEP @ Progress
IOT - Presentation to PEP @ Progress
 
Node.js as an IOT Bridge
Node.js as an IOT BridgeNode.js as an IOT Bridge
Node.js as an IOT Bridge
 
What is IoT and how Modulus and Pacific can Help - Featuring Node.js and Roll...
What is IoT and how Modulus and Pacific can Help - Featuring Node.js and Roll...What is IoT and how Modulus and Pacific can Help - Featuring Node.js and Roll...
What is IoT and how Modulus and Pacific can Help - Featuring Node.js and Roll...
 
What is the Internet of Things and How it Impacts You
What is the Internet of Things and How it Impacts YouWhat is the Internet of Things and How it Impacts You
What is the Internet of Things and How it Impacts You
 
Community Update 25 Mar2010 - English
Community Update 25 Mar2010 - EnglishCommunity Update 25 Mar2010 - English
Community Update 25 Mar2010 - English
 
GlassFish Community Update 25 Mar2010
GlassFish Community Update 25 Mar2010GlassFish Community Update 25 Mar2010
GlassFish Community Update 25 Mar2010
 
Glass Fish Portfolio C1 West V3.Mini
Glass Fish Portfolio C1 West V3.MiniGlass Fish Portfolio C1 West V3.Mini
Glass Fish Portfolio C1 West V3.Mini
 
Virtual Box Aquarium May09
Virtual Box Aquarium May09Virtual Box Aquarium May09
Virtual Box Aquarium May09
 
Introduction To Web Beans
Introduction To Web BeansIntroduction To Web Beans
Introduction To Web Beans
 
Ehcache Architecture, Features And Usage Patterns
Ehcache Architecture, Features And Usage PatternsEhcache Architecture, Features And Usage Patterns
Ehcache Architecture, Features And Usage Patterns
 
OpenDS Primer Aquarium
OpenDS Primer AquariumOpenDS Primer Aquarium
OpenDS Primer Aquarium
 
Fuji Overview
Fuji OverviewFuji Overview
Fuji Overview
 
Nuxeo 5.2 Glassfish
Nuxeo 5.2 GlassfishNuxeo 5.2 Glassfish
Nuxeo 5.2 Glassfish
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

Java Persistence 2.0

  • 1. Java Persistence 2.0 Linda DeMichiel Java Persistence 2.0 Specification Lead Sun Microsystems
  • 2. Java Persistence 1.0 • Standardized O/R Mapping for Java EE and Java SE environments • A great start ..... 2
  • 3. Java Persistence 2.0 • Expanded O/R mapping functionality • Expanded query language to match • Criteria API • Pessimistic locking • Standardized hints and properties • Support for validation • And...some needed cleanups... 3
  • 4. Progress to Date: Early Draft • Expanded O/R mapping and modeling > Collections of basic types and embeddables > Relationships from embeddables > Multiple levels of embeddables > Persistent lists > Real maps and ternary relationships > Additional database schema mappings – one-to-many foreign key mappings for unidirectional relationships – one-to-one, many-to-one join table mappings > Real overlapping PK/FK modeling support – “derived identities” > Combinations of access types > Orphan deletion 4
  • 5. Progress to Date: Early Draft • Pessimistic locking > At both entity and query result levels • Standardized hints and properties > For locking > For configuration • Simple API for interaction with provider's cache 5
  • 6. Progress to Date: Public Review Draft • Java Persistence Query Language > Extensions for new mapping types > Support for non-polymorphic queries > Scalar expressions in SELECT list > Case statements > INDEX, KEY, VALUE, ENTRY operators for maps and lists > Collection-valued parameters for IN expressions > More flexibility in subqueries > ... 6
  • 7. Progress to Date: Public Review Draft • Criteria API > Dynamic, non-string-based API > Supports everything that JPQL queries can do > Integrates with existing Query API – Create query definitions – Pass them to createQuery to create Query objects 7
  • 8. Example: Criteria API ... QueryBuilder qb = EntityManager.getQueryBuilder(); DomainObject customer = qb.createQueryDefinition(Customer.class); DomainObject order = customer.join(“orders”); DomainObject address = customer.join(“address”); customer.where(address.get(“state”).equal(“CA”)) .select(order) .orderBy(order.get(“quantity”).desc(), order.get(“totalcost”)); 8
  • 9. Status and Roadmap • Public Review Draft > Submitted to JCP last week > Expected to appear in 1 - 2 weeks > http://jcp.org/en/jsr/detail?id=317 • Proposed Final Draft in December > Will target support for Validation (JSR 303) • Final Release in June > As part of Java EE 6 and as standalone Your feedback is important! > jsr-317-pdr-feedback@sun.com 9
  • 10. GlassFish and Java Persistence • Java Persistence 1.0 in GlassFish v3 Prelude today > EclipseLink 1.0 > Hibernate EntityManager > OpenJPA • Java Persistence 2.0 RI will be provided by EclipseLink project > Will be available in GlassFish v3 10
  • 11. Java Persistence 2.0 Linda DeMichiel Sun Microsystems