Have a personal or library account? Click to login
Mastering Hibernate Cover

Mastering Hibernate

Learn how to correctly utilize the most popular Object-Relational Mapping tool for your Enterprise application

Paid access
|May 2016
Product purchase options

Learn how to correctly utilize the most popular Object-Relational Mapping tool for your Enterprise application

Key Features

  • Understand the internals of Hibernate and its architecture, and how it manages Entities, Events, Versioning, Filters, and Cache
  • Observe how Hibernate bridges the gap between object-oriented concepts and relational models
  • Discover how Hibernate can address architectural concerns such as Transaction, Database Multi-tenancy, Clustering, and Database Shards

Book Description

Hibernate has been so successful since its inception that it even influenced the Java Enterprise Edition specification in that the Java Persistence API was dramatically changed to do it the Hibernate way. Hibernate is the tool that solves the complex problem of Object Relational Mapping. It can be used in both Java Enterprise applications as well as .Net applications. Additionally, it can be used for both SQL and NoSQL data stores.

Some developers learn the basics of Hibernate and hit the ground quickly. But when demands go beyond the basics, they take a reactive approach instead of learning the fundamentals and core concepts. However, the secret to success for any good developer is knowing and understanding the tools at your disposal. It’s time to learn about your tool to use it better

This book first explores the internals of Hibernate by discussing what occurs inside a Hibernate session and how Entities are managed. Then, we cover core topics such as mapping, querying, caching, and we demonstrate how to use a wide range of very useful annotations.
Additionally, you will learn how to create event listeners or interceptors utilizing the improved architecture in the latest version of Hibernate.

What you will learn

  • Understand the internals of a Hibernate session and how Entities are managed
  • Declare better mapping between entity classes and database tables
  • Manage entity associations and collections
  • Fetch data not just by entity ID, but also using HQL, Criteria Objects, Filters, and Native SQL
  • Observe the first and second level caches and find out how to manage them
  • Collect statistics and metrics data for further observation
  • Make your application work with multi-tenant databases

Who this book is for

Mastering Hibernate is intended for those who are already using or considering using Hibernate as the solution to address the problem of Object Relational Mapping. If you are already using Hibernate, this book will help you understand the internals and become a power user of Hibernate.

Table of Contents

  1. Entity and Session
  2. Advanced Mapping
  3. Types of Annotations
  4. Advanced Fetching
  5. Hibernate Cache
  6. Interceptor, Events and Envers
  7. Metrics and Statistics
  8. Addressing Architecture
  9. Integrating Hibernate with EJB and Spring Context
https://github.com/packtpublishing/mastering-hibernate
PDF ISBN: 978-1-78528-875-3
Publisher: Packt Publishing Limited
Copyright owner: © 2016 Packt Publishing Limited
Publication date: 2016
Language: English
Pages: 204