JPA is a powerful framework that can bite you if you don’t use it properly. This session’s speaker, a senior architect, discusses lessons learned in tuning JPA with Hibernate to support a high-volume, high-performance e-commerce site. He relates stories and examples of common JPA pitfalls that have bitten developers at Overstock.com and provides best practices for avoiding these issues. The presentation focuses primarily on how the entity management and transactional aspects of JPA with Hibernate can affect application performance and behavior. Key concepts such as persistence context, lazy loading, caching, flushing, dirty checking, and transaction and connection demarcation are explored. Filmed at JavaOne 2014.