CHAPTER 8

image

Data Access in Spring with JPA2

In the previous chapter, we discussed how to use Hibernate with Spring when implementing data access logic with the ORM approach. We demonstrated how to configure Hibernate’s SessionFactory in Spring’s configuration and how to use the Session interface for various data access operations. However, that is just one way Hibernate can be used. Another way of adopting Hibernate in a Spring application is to use Hibernate as a persistence provider of the standard Java Persistence API (JPA)See also JPA 2.1.

Hibernate’s POJO mapping and its powerful query language (HQL) have gained great success and also influenced ...

Get Pro Spring,Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.