About The Trainer

Vlad Mihalcea, is CEO of Hypersistence and works as a Developer Advocate for the Hibernate project. He is also author of the book High-Performance Java Persistence.

Overview

The High-Performance Java Persistence training is aimed to level up your team’s data access skills, covering JDBC, Hibernate, and many database essential topics for Oracle, SQL Server, MySQL or PostgreSQL.

Outline

Day 1 - Introduction

  • O/R Mismatch
  • JPA vs Hibernate
  • Schema ownership and incremental migrations
  • Integration testing strategies

Hibernate Connection Management

  • Connection Providers
  • Connection Monitoring
  • Statement Logging and the statement count validator

Basic Mappings

  • Types
  • Entity
  • Embedded
  • JPA Identifiers
  • Legacy and enhanced identifier generators (hilo, pooled-lo)

Relationships

  • Many-to-One
  • One-to-One
  • One-to-Many
  • Many-to-Many
  • Embedded Collections

Day 2 - Inheritance

  • Single table inheritance caveats
  • Joined table inheritance caveats
  • Composition vs inheritance

Entity state transitions

  • Flushing basics
  • AUTO flush caveats
  • Dirty checking
  • Flush operation order
  • Bytecode enhancement dirty checking

Batch updates and ResultSet fetching

  • JDBC batching
  • How to batch INSERT and UPDATE statements
  • How to batch DELETE statements

Fetching

  • Natural key
  • DTO projections
  • Entity queries
  • LAZY vs EAGER
  • Query-time fetching

Concurrency control

  • Isolation levels and database concurrency control
  • Preventing lost updates in long conversations
  • Logical vs physical clock optimistic locking
  • Hibernate collections optimistic locking
  • Version-less optimistic locking
  • Java Persistence locking
  • Explicit OPTIMISTIC Lock Mode
  • OPTIMISTIC_FORCE_INCREMENT Lock Mode
  • PESSIMISTIC_FORCE_INCREMENT Lock Mode
  • PESSIMISTIC_READ and PESSIMISTIC_WRITE Lock Modes

Caching

  • Database caching
  • Application caching
  • Second-level cache entries
  • Cache synchronization strategies
  • READ_ONLY CacheConcurrencyStrategy
  • NONSTRICT_READ_WRITE CacheConcurrencyStrategy
  • READ_WRITE CacheConcurrencyStrategy
  • TRANSACTIONAL CacheConcurrencyStrategy
  • Collection Cache
  • Query Cache