Spring Persistence with Hibernate

Build robust and reliable persistence solutions for your enterprise Java application

Spring Persistence with Hibernate

Ahmad Seddighi

Build robust and reliable persistence solutions for your enterprise Java application
Mapt Subscription
FREE
$30.00/m after trial
eBook
$21.00
RRP $29.99
Save 29%
Print + eBook
$49.99
RRP $49.99
What do I get with a Mapt subscription?
  • Unlimited access to all Packt’s 6,000+ eBooks and Videos
  • 100+ new titles a month, learning paths, assessments & code files
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the subscription reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the subscription reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the subscription reader
$0.00
$21.00
$49.99
$29.99 p/m after trial
RRP $29.99
RRP $49.99
Subscription
eBook
Print + eBook
Start 14 Day Trial

Frequently bought together


Spring Persistence with Hibernate Book Cover
Spring Persistence with Hibernate
$ 29.99
$ 21.00
Spring Data Book Cover
Spring Data
$ 17.99
$ 12.60
Buy 2 for $30.10
Save $17.88
Add to Cart

Book Details

ISBN 139781849510561
Paperback460 pages

Book Description

Spring is the leading platform to build and run enterprise Java applications. Spring's Hibernate integration makes it easy to mix and match persistence methodologies simplifying your Hibernate applications. You can incorporate lots of Inversion of Control (IoC) convenience features to address many typical Hibernate integration issues, making this integration all the more favorable for your application.

This easy-to-use book will turn the complex-sounding integration into a straightforward walk-through. Persistence is important for creating a data access-based transactions tier, central to financial, insurance, and banking applications. You will be able to enhance your applications using the most common, advanced, and optional features of Hibernate.

This book starts with the philosophy and the brief history of persistence. It provides an introduction to how persistence frameworks and technologies came into the development scene and what problems they are aimed to solve.

The book continues with a discussion about Hibernate as the most popular persistence framework in Java. First, you will learn how to get Hibernate and add it to a project and how to configure it before it can be used. Next, you will get an in-depth knowledge about Hibernate and understand the essential concepts behind persistence with Hibernate and more. When Hibernate has been fully discussed, you will get to know Spring as another popular framework in Java, and have a look at essential features of Spring and its added value for Hibernate-based projects. Finally the book will provide a comprehensive discussion about using Hibernate with Spring and the problems that are solved with Spring.

Table of Contents

What You Will Learn

  • Learn the philosophy, the history, and the usage of Persistence
  • Solve problems related to Persistence by gaining a complete understanding of Hibernate
  • Know your competitors and gear yourself to knock down your competition using Hibernate exhaustively
  • Get to know the role of Spring in Persistence and learn to configure Hibernate and Spring
  • Use the essential, most commonly-used Hibernate features such as Transparent persistence, Object-Relational mappings, Object-oriented query language, and more
  • Exploit the optional and advanced Hibernate features to enhance your applications
  • Learn and integrate common Spring features that are a part and parcel of every Java project
  • Make the most out of the Spring features that are related to persistence, particularly to Hibernate
  • Develop sophisticated web applications using Spring Persistence with Hibernate and successfully test them

Here is a brief summary of what each chapter covers:

Chapter 1An Introduction to Hibernate and Spring introduces Spring and Hibernate, explaining what persistence is, why it is important, and how it is implemented in Java applications. It provides a theoretical discussion of Hibernate and how Hibernate solves problems related to persistence. Finally, we take a look at Spring and the role of Spring in persistence.

Chapter 2 - Preparing an Application to Use Spring with Hibernate guides you, step by step, down the path of preparing your application to use Hibernate and Spring. The prerequisites to developing with Hibernate and Spring—getting Hibernate and Spring distributions, setting up a database, and adding extra toolsand frameworks to your application—are all discussed here. 

Chapter 3 - A Quick Tour of Hibernate with Spring provides a quick tour of developing with Hibernate and Spring. Here, a simple example illustrates the basic concepts behind Hibernate and Spring.

Chapter 4Hibernate Configuration shows you how to configure and set up Hibernate. It discusses the basic configuration settings that are always required in any application. (Some optional settings are covered in the book's appendix.)

Chapter 5Hibernate Mappings explains basic issues related to persistent objects and their mappings. It starts with basic mapping concepts and then moves on to advanced and practical issues.

Chapter 6More on Mappings continues the mapping discussion with some advanced mapping topics. It explains how to map complex objects and create complicated mapping files.

Chapter 7Hibernate Types discusses how Hibernate types help to define which Java types are mapped to which SQL database types. It explores the built-in Hibernate types. It also looks at custom type implementation when these built-in types do not satisfy the application's requirements or when you want to change the default behavior of a built-in type.

Chapter 8 - Hibernate Persistence Behavior discusses the life cycle of persistent objects within the application's lifetime. This chapter explains the basic persistence operations provided by the Session API at the heart of the Hibernate API. The chapter also discusses how persistence operations are cascaded between persistent objects and how cascading behavior is defined in mapping files

Chapter 9Querying in Hibernate explains the different approaches that Hibernate provides for querying persistent objects. It investigates HQL, a Hibernate-specific query language; native SQL, a database-relevant query language; and the Criteria API, a Hibernate API to express query statements.

Chapter 10Inversion of Control with Spring starts developing with Spring, introducing the Inversion of Control (IoC) pattern that is implemented at the heart of Spring.

Chapter 11Spring AOP investigates Aspect-Oriented Programming (AOP) as another Spring feature. Here, you'll learn what AOP means, how AOP simplifies application architecture, and how to implement AOP in Spring.

Chapter 12 - Transaction Management discusses transaction management. It explains transaction concepts and how transactions are managed in native and Spring-based Hibernate applications. It also discusses caching as a persistence aspect that involves reliability of data manipulation.

Chapter 13 - Integrating Hibernate with Spring explains how Hibernate and Spring are integrated and introduces the Data Access Object (DAO) pattern. It shows how Spring and Hibernate combine to implement this pattern.

Chapter 14 - Web Development with Hibernate and Spring provides a quick discussion of web development with Spring and Hibernate. It does not provide a detailed discussion of web development; instead, it takes Spring and Struts as sample web frameworks to illustrate how you might use Spring and Hibernate to develop web applications.

Chapter 15Unit Testing looks into testing persistence code, with a focus on unit testing. It introduces JUnit as an open-source unit-testing framework and discusses which aspects of persistence code with Hibernate require testing.

Appendix - Hibernate's Advanced Features looks at some advanced Hibernate topics, including some useful Hibernate properties, the event/listener model implemented by Hibernate, and Hibernate filters.

Authors

Table of Contents

Book Details

ISBN 139781849510561
Paperback460 pages
Read More

Read More Reviews

Recommended for You

Spring Data Book Cover
Spring Data
$ 17.99
$ 12.60
Hibernate Search by Example Book Cover
Hibernate Search by Example
$ 17.99
$ 12.60
Java 7 Concurrency Cookbook Book Cover
Java 7 Concurrency Cookbook
$ 29.99
$ 21.00
RabbitMQ Cookbook Book Cover
RabbitMQ Cookbook
$ 26.99
$ 18.90
Web Services Testing with soapUI Book Cover
Web Services Testing with soapUI
$ 29.99
$ 21.00
Spring Web Services 2 Cookbook Book Cover
Spring Web Services 2 Cookbook
$ 29.99
$ 21.00