Java EE Persistence with Hibernate

This course offers a comprehensive and detail-oriented treatment of Hibernate® and the Java Persistence API (JPA) and their use in the Java-EE environment. We cover JPA basics including simple object/relational concepts and annotations, persistence contexts and entity managers, and configuration via persistence.xml. We get a good grounding in the Java Persistence Query Language (JPQL) and take advantage of a prepared JPQL query console to explore the two schemas on which the course's case studies are based. We then look at practical issues involved in using JPA in the enterprise context, including Java EE Bean Validation, working with server-managed data sources, dependency injection, container-managed transactions, and transaction propagation.

This version of the course supports JPA 2.1 with Hibernate 5.0. EclipseLink 2.6 is deployed with the course software as well; switching providers is just a matter of moving a few lines in and out of XML comments in the relevant persistence.xml file, and we encourage instructors to demonstrate both providers, to illustrate portability and for comparison of some finer points.

The course also supports either the Derby or Oracle RDBMS. Derby is bundled with the course software and is pre-configured; a script is included to change over to Oracle configurations for all exercises and schema-creation scripts are available for both.

  1. Understand the value of object/relational mapping and JPA's role as a standard for ORM implementations.
  2. Develop JPA entities using JPA annotations to align the Java classes, properties, and types to relational tables, columns, and types.
  3. Create entity managers and instantiate persistence contexts to perform create/retrieve/update/delete (CRUD) operations.
  4. Implement entity relationships of all cardinalities, including unidirectional and bidirectional relationships.
  5. Map composite primary keys, inheritance relationships, eager/lazy fetching, and cascading operations.
  6. Use JPQL to write object-oriented queries, and process query results.
  7. Define JSR-303 validation constraints on JPA entities and see them enforced by the JPA provider.
  8. Use server-managed data sources.
  9. Take advantage of Java-EE dependency injection to connect entity managers and factories.
  10. Use annotations to direct container-managed transactions and to control transaction propagation.
  1. Introduction to JPA
    1. Object/Relational Mapping
    2. Mismatches Between Relational and Object Models
    3. The Java Persistence API
    4. Hibernate
    5. Architecture
    6. Entity Metadata
    7. The Entity Manager
  2. Single-Table Mapping
    1. Annotations
    2. JavaBean Standards
    3. Property, Field, and Mixed Access
    4. Table and Column Mapping
    5. Primary Keys and Key Generation
    6. Type Mappings
    7. Temporal and Enumerated Types
    8. Embedded Types
    9. Converters
  3. Mapping Associations
    1. @Embeddable Types
    2. Entity Relationships
    3. @ManyToOne Relationships
    4. @OneToOne Relationships
    5. @OneToMany Relationships
    6. @ManyToMany Relationships
    7. Eager and Lazy Loading
  4. Entity Managers
    1. Putting Entities to Work
    2. persistence.xml
    3. Entity State and Transitions
    4. Managing Transactions
    5. Persistence Operations
    6. Creating Queries
    7. Named Queries
    8. Query Parameters
    9. Native Queries
    10. Stored-Procedure Queries
  5. JPQL
    1. The Java Persistence Query Language
    2. HQL and JPQL
    3. Query Structure
    4. Path Expressions
    5. Filtering
    6. Scalar Functions
    7. Using Native Functions
    8. Operators and Precedence
    9. between, like, in
    10. is null, is empty
    11. Ordering
    12. Aliases
    13. Grouping
    14. Aggregate Functions
    15. Joins
    16. Fetch Joins
    17. Constructors
    18. Updates and Deletes
  6. Persistence Components
    1. Encapsulating Persistence Logic
    2. Design Considerations
    3. Testability
    4. Transaction Control
    5. Exception Handling
    6. Generic Types
  7. Advanced Mappings
    1. Inheritance Strategies
    2. Single-Table Strategy
    3. Joined-Table Strategy
    4. Table-Per-Concrete-Class Strategy
    5. Querying Over Inheritance Relationships
    6. Type Identification with .class
    7. Secondary Tables
    8. Composite Primary Keys
    9. @IdClass and @EmbeddedId
    10. Derived Identifiers
    11. @ElementCollection
    12. Default Values
    13. @Version Fields
    14. Cascading and Orphan Removal
    15. Detachment and Merging
    16. Hibernate Extensions
    17. The @Type Annotation
  8. Validation
    1. JSR-303 Validation
    2. Constraint Annotations
    3. Validation Modes
    4. Validation Groups
    5. Handling Validation Exceptions
  9. JPA in Java EE
    1. Enterprise Applications
    2. Dependency Injection
    3. Separation of Concerns
    4. JNDI
    5. JDBC Data Sources
    6. @PersistenceUnit and @PersistenceContext
    7. Container-Managed Transactions
    8. Enterprise JavaBeans
    9. @Stateful and @Stateless
    10. @EJB
    11. @TransactionAttribute
    12. Logging Transactions
    13. Impact on Exception Handling
    14. Persistence-Context Duration
    15. Extended Persistence Contexts
    16. Testability
Class Materials

Each student in our Live Online and our Onsite classes receives a comprehensive set of materials, including course notes and all the class examples.

Class Prerequisites

Experience in the following is required for this Java EE class:

  • A strong Java programming background is essential for this course
  • Knowledge of relational database concepts and SQL is recommended
  • Prior experience with JDBC will be a plus but is not required.

Training for your Team

Length: 4 Days
  • Private Class for your Team
  • Online or On-location
  • Customizable
  • Expert Instructors

Training for Yourself

$2,300.00 or 4 vouchers

Upcoming Live Online Classes

  • See More Classes

Please select a class.
  • Live Online Training
  • For Individuals
  • Expert Instructors
  • Guaranteed to Run
  • 100% Free Re-take Option
  • 1-minute Video

What people say about our training

The Advanced Microsoft PowerPoint Training exceeded my expectations. The instructor moved the class along at a good pace, yet paused when there were questions. Will definitely recommend this course to my colleagues.
Marta Feilen
New Avon
The instructor is very knowledgable and kept everything moving at a comfortable pace.
Lauren Cotton
Martin Marietta Materials
I learned more useful information than I have ever gotten from any other similar course by any vendor. Even though I consider myself an advanced level user, I learned things that I can apply not only to Project, but also other MS Office tools. It moved well -- just the right pace.
Deane Williams
Great introductory course that can be taken anywhere in the world!
Ryan Ziskind
Steward Health Care

No cancelation for low enrollment

Certified Microsoft Partner

Registered Education Provider (R.E.P.)

GSA schedule pricing


Students who have taken Instructor-led Training


Organizations who trust Webucator for their Instructor-led training needs


Satisfaction guarantee and retake option


Students rated our trainers 9.29 out of 10 based on 29,186 reviews

Contact Us or call 1-877-932-8228