3 days
Online / Zoom
English
Certificate
15 people max
Victor Rentea
€11200
14000
For developers who thought they knew Hibernate—until performance issues or JPA magic bugs led them to this training. Gain a deep, practical understanding of JPA and Hibernate to write faster, safer, and more predictable code.
Introduction
This training will give you a clear understanding of Hibernate’s powerful features and how to avoid its most common pitfalls. You’ll learn to recognize key ORM performance traps, understand transaction control, and perform efficient mass data inserts. By the end, you’ll be able to trace and fix common performance bottlenecks, write efficient and maintainable read queries, optimize updates and batch operations, and design rich, efficient ORM entity models. This training is ideal for developers who have worked with Hibernate but feel they’re missing insight into its inner workings. Prior experience with fixing SQL performance issues is helpful but not required.
Agenda
Efficient Reading & Searching
Eager vs Lazy Loading
JPA 1st Level Cache
N+1 Queries problem & fixes
Paginated searches best practices
Hierarchical Data Processing
Dynamic queries: JPQL+=, Criteria ±metamodel, specifications, conditional JPQL, and QueryDSL
Rich & Performant Entity Model
Deep (@Embedded), Guarded Entities (DDD-style) with Semantic IDs
Primitive vs Reference Entity vs enum
Challenging JPA Links: bidirectional, and @ManyToOne
Entity hashCode/equals fallacy
Best practices storing files in DB (CLOB/BLOB)
Efficient Transactions
Transactional mechanics, propagation, rollback, after commit hooks
Dirty checks, auto-flushing & write-behind
How to detect and avoid JDBC Connection Pool Starvation
Transaction control best practices
Updating Entities
Concurrency Control using Optimistic and Pessimistic locks
Generating Primary Key efficiently
Demo: High-performance JPA data import using Spring Batch
[optional] Bulk update JPQL queries - pitfalls
Caching (optional)
Hibernate Second-level cache for Entities and Queries
Comparison with Spring's @Cacheable
Victor Rentea
Victor is a Java Champion, Java Enterprise Architect, and Independent Trainer, delivering intense masterclasses for companies worldwide since 2014. He is passionate about software architecture, clean code, refactoring, and unit testing. He is a regular speaker at top international conferences. He's also the founder of the Bucharest Software Craftsmanship Community with 4000 members.