Friday, November 30, 2018

Hibernate Acceleration With Snapshots

A Google search for "Hibernate" and "performance" will yield innumerable articles describing how to fix performance issues. This post is not yet another performance improver. Instead, we will demonstrate how to remove bottlenecks in your Hibernate project by using JPA support in Spring boot in tandem with in-JVM-memory snapshots which provide speedups of orders of magnitude. Let us use the Sakila sample database for the purpose of this post. The database contains, among other things, Films and Actors and relations between them.

A Straightforward Hibernate and Spring Application

A non-complicated way of interacting with a relational database is to use the Spring JPA plugin to allow Spring to handle dependency injection and setup of the project. This allows for a pure java implementation without any XML code to set up the ORM. For example, a properly annotated plain Film class is all that is needed to map the database table of films into the Java object domain.



from DZone.com Feed https://ift.tt/2E4euLL

No comments:

Post a Comment