Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

CHAPTER 10: Data Access in Spring with JPA2

C H A P T E R  10

Data Access in Spring with JPA2

In the previous chapter, we discussed how to use Hibernate in Spring applications 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 Hibernate’s Session interface for various data access operations.

However, what we discussed in the previous chapter was just one aspect of Hibernate’s usage. Another way of adopting Hibernate in a Spring application is to use Hibernate as a persistence provider of the JCP standard, the Java Persistence API (JPA).

As discussed earlier, Hibernate’s POJO base mapping and its powerful query language (HQL) have gained great success and have influenced the development of data access technology standards in the Java world. After Hibernate, the JCP developed the Java Data Objects (JDO) standard and then JPA.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint