SlideShare ist ein Scribd-Unternehmen logo
1 von 11
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Ähnlich wie 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
 

Ähnlich wie 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 ?
 

Mehr von Eduardo Pelegri-Llopart

Mehr von 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
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Kürzlich hochgeladen (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
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)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

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