Learning Patterns Your Source for Quality Technology Courseware

Introduction to the Java Persistence API Version 2 (JPA 2)

As part of the complete overhaul of the Enterprise JavaBeans (EJB) specification, database persistence was broken out into a completely separate specification, the Java Persistence API (JPA). JPA replaces entity beans with powerful new Object-Relational Mapping (ORM) capabilities based on proven technologies such as Toplink and Hibernate. This course includes all important features from JPA 2, and is also suitable for users of the 1.0 release.

JPA supports a POJO (Plain Old Java Object) based model using annotations which lets you develop persistent classes following common Java idioms. It supports entity relationships, inheritance, polymorphism, composition, and much more. The Java Persistence Query Language (JPQL), which is based on SQL but operates on the object model, provides a powerful bridge between the object and relational worlds. JPA also allows you to express queries using native SQL, including the capability to map the SQL query results to persistent entities

This course covers everything you need to know to begin working with the Java Persistence API in a very short time. It covers all the important concepts necessary to access and update data stored in relational databases. It includes an extensive series of labs to exercise all major capabilities.

Course Objectives:

  • Understand the JPA architecture
  • Create JPA based applications
  • Understand and use JPA to map persistent objects to the database
  • Create JPA persistence units, and understand JPA persistence contexts and the Entity Lifecycle
  • Use the JPA EntityManager
  • Work with queries and JPQL (Java Persistence Query Language), as well as the Criteria API (JPA 2)
  • Understand and work with collections & associations
    • Value and Entity Types
    • Bidrectional and unidirectional
    • 1-1, 1-N, N-N
  • Use versioning support for optimistic locking
  • Map inheritance hierarchies using JPA
  • Performance tune your JPA applications
  • Understand JPA transaction support
  • Understand the relationship between JPA / EJB3
  • Use JPA entities from session beans (Optional)
  • Be familiar with Spring support for JPA (Optional)

Course Outline: