• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Java Persistence API (JPA) - A Brief Overview
 

Java Persistence API (JPA) - A Brief Overview

on

  • 6,361 views

This is a lightning presentation given by Scott Rabon, a member of my development team. He presents a high level overview of the JPA based on his first exposure to it.

This is a lightning presentation given by Scott Rabon, a member of my development team. He presents a high level overview of the JPA based on his first exposure to it.

Statistics

Views

Total Views
6,361
Views on SlideShare
6,281
Embed Views
80

Actions

Likes
1
Downloads
128
Comments
0

4 Embeds 80

http://craigsdickson.com 49
http://www.slideshare.net 20
http://craigsdickson.me 10
http://www.linkedin.com 1

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Java Persistence API (JPA) - A Brief Overview Java Persistence API (JPA) - A Brief Overview Presentation Transcript

    • Java Persistence API (JPA) A Brief Overview By Scott Rabon
    • We have come a long way • Java application persistence history – JDBC – EJB Entity Beans 1
    • Industry answered the call • Proprietary persistence products were introduced – JBoss Hibernate – Oracle Top Link 2
    • Why Another Standard • Standard goes deeper than a product • Can be implemented by different vendors • Developers code to interface, not implementation 3
    • A Standard Is Born JSR 220 – EJB 3.0 Specification Java Persistence API part of EJB 3.0 Specification 4
    • JPA Fun Facts • JSR 220 formed May 2003 • Released May 2006 • Expert group consisted of industry ORM developers 5
    • JPA – Designed for Ease of Use • Main goal of design team • Elegant, powerful and flexible • Easy to learn 6
    • Aspects: POJO Persistence • Objects are POJO’s • Mapping is metadata driven • External XML or annotation based 7
    • Aspects: Non Intrusiveness • API does not intrude on objects • API exists as a separate layer from persistent objects • Objects are “unaware” of the API 8
    • Aspects: Object Queries • Query across entities and relationships • Expressed in Java Persistence Query Language (JPQL) • Uses a schema abstraction 9
    • Aspects: Mobile Entities • Detachment Model • Move entities between JVM’s • Can change state anywhere along the way • Reattach upon return 10
    • Aspects: Simple Configuration • Java SE 5 Annotations • XML • Heavy use of defaults 11
    • Aspects: Integration and Testability • Challenge: Testing on an app server • API works outside application server – Two tier apps – Unit tests and automated testing frameworks 12
    • Entities Not same as entity beans 13
    • Entity Characteristics - Persistability • Entities must be persistable • State can be represented in a data store • Entities can be manipulated without having persistent repercussions – app must use API 14
    • Entity Characteristics - Identity • Key that uniquely identifies an instance • Persistent identity • Equivalent to primary key 15
    • Entity Characteristics - Transactionality • Adds, updates and deletes normally occur in a transaction • Changes succeed or fail atomically • In memory entities 16
    • Entity Characteristics - Granularity • Not primitives, wrappers, built-in objects • Are business domain objects that mean something • Should be fairly lightweight objects 17
    • Entity Manager • Interface encapsulating most persistence functionality • Set of managed instances is named persistence context 18
    • Queries • Use JPQL syntax • Can be defined statically (named) or dynamically • Dynamic queries supply query criteria 19
    • JPA’s future - Independence • Break free from the EJB specification • Will get it’s own JSR for future evolution 20
    • The End 5 minutes of question time starts now!
    • Questions 4 minutes left!
    • Questions 3 minutes left!
    • Questions 2 minutes left!
    • Questions 1 minute left!
    • Questions 30 seconds left!
    • Questions TIME IS UP!