Java Persistence With Hibernate

Christian Bauer & Gavin King & Gary Gregory

Language: English

Publisher: Manning

Published: Nov 24, 2006

Description:

Persistence-the ability of data to outlive an instance of a program-is central to modern applications. Hibernate, the most popular Java persistence tool, provides automatic and transparent object/relational mapping making it a snap to work with SQL databases in Java applications. Hibernate applications are cheaper, more portable, and more resilient to change. Because it conforms to the new EJB 3.0 and Java Persistence 1.0 standard, Hibernate allows the developer to seamlessly create efficient, scalable Java EE applications.

Java Persistence with Hibernate explores Hibernate by developing an application that ties together hundreds of individual examples. You'll immediately dig into the rich programming model of Hibernate 3.2 and Java Persistence, working through queries, fetching strategies, caching, transactions, conversations, and more. You'll also appreciate the well-illustrated discussion of best practices in database design, object/relational mapping, and optimization techniques.

In this revised edition of the bestselling Hibernate in Action , authors Christian Bauer and Gavin King-the founder of the Hibernate project-cover Hibernate 3.2 in detail along with the EJB 3.0 and Java Persistence standard.

From the Publisher

Java Persistence with Hibernate is divided into three major parts.

In Part 1, the book introduces the object/relational paradigm mismatch and explains the fundamentals behind object/relational mapping. Then, readers are walked through a hands-on tutorial to get you started with your first Hibernate, Java Persistence, or EJB 3.0 project. You look at Java application design for domain models and at the options for creating object/relational mapping metadata.

Mapping Java classes and properties to SQL tables and columns is the focus of Part 2. You explore all basic and advanced mapping options in Hibernate and Java Persistence, with XML mapping files and Java annotations. It shows you how to deal with inheritance, collections, and complex class associations. Finally, the book discusses integration with legacy database schemas and some mapping strategies that are especially tricky.

Part 3 is all about the processing of objects and how you can load and store data with Hibernate and Java Persistence. The book introduces the programming interfaces, how to write transactional and conversation-aware applications, and how to write queries. It later focuses on the correct design and implementation of layered Java applications, and the most common design patterns that are used with Hibernate, such as the Data Access Object (DAO) and EJB Command patterns. You'll see how you can test your Hibernate application easily and what other best practices are relevant if you work an object/relational mapping software.

Finally, you are introduced to the JBoss Seam framework, which takes many Hibernate concepts to the next level and enables you to create conversational web applications with ease.

Visit the Manning site for sample chapters, the Author Online Forum, errata and source code for Java Persistence with Hibernate.

About the Author

Christian Bauer is a member of the Hibernate developer team. He works as a trainer, consultant, and product manager for Hibernate, EJB 3.0, and JBoss Team at JBoss, a division of Red Hat. He is the co-author with Gavin King of Manning's best-selling Hibernate in Action.