14 High-Performance Java Persistence Tips

Introduction In this article, I’m going to show you various high-performance Java Persistence optimization tips that will help you get the most out of your data access layer. A high-performance data access layer requires a lot of knowledge about database internals, JDBC, JPA, Hibernate, and this post summarizes some of the most important techniques you can use to optimize your enterprise application. 1. SQL statement logging If you’re using a framework that generates statements on your behalf, you should always validate the effectiveness and efficiency of each executed statement. A testing-time assertion… Read More

The Open Session In View Anti-Pattern

Introduction Open Session in View is an Anti-Pattern, and this post is going to demonstrate why it is so. First of all, let’s start with the Wikipedia definition of an Anti-Pattern: An anti-pattern (or antipattern) is a common response to a recurring problem that is usually ineffective and risks being highly counterproductive.

How to call PostgreSQL functions (stored procedures) with JPA and Hibernate

Introduction This article is part of a series of posts related to calling various relational database systems stored procedures and database functions from Hibernate. The reason for writing this down is because there are many peculiarities related to the underlying JDBC driver support and not every JPA or Hibernate feature is supported on every relational database.

High-Performance Java Persistence – Chapter 16 – Caching

Part 2, Chapter 16 Every new chapter of my book is released right after it’s being completed, so the reader doesn’t have to wait for the whole part to be finished to get access to new material. Table of content This chapter explains how enterprise caching works, from database internal buffers, to application-level caching, and the second-level cache offered by Hibernate.

High-Performance Java Persistence – Chapter 15 – Fetching

Part 2, Chapter 15 Every new chapter of my book is released right after it’s being completed, so the reader doesn’t have to wait for the whole part to be finished to get access to new material. Table of content This chapter explains how fetching works in Hibernate.

How to call Oracle stored procedures and functions with JPA and Hibernate

Introduction This article is part of a series of posts related to calling various relational database systems stored procedures and database functions from Hibernate. The reason for writing this down is because there are many peculiarities related to the underlying JDBC driver support and not every JPA or Hibernate feature is supported on every relational database.

High-Performance Java Persistence – Chapter 14 – Batching

Part 2, Chapter 14 Every new chapter of my book is released right after it’s being completed, so the reader doesn’t have to wait for the whole part to be finished to get access to new material. Table of content This chapter explains how batch updates work in Hibernate.

High-Performance Java Persistence – Chapter 13 – Flushing

Part 2, Chapter 13 Every new chapter of my book is released right after it’s being completed, so the reader doesn’t have to wait for the whole part to be finished to get access to new material. Table of content This chapter explains the inner-workings of the Hibernate Persistence Context implementation.

High-Performance Java Persistence – Chapter 12 – Inheritance

Part 2, Chapter 12 Every new chapter of my book is released right after it’s being completed, so the reader doesn’t have to wait for the whole part to be finished to get access to new material. Table of content This chapter explains JPA inheritance from a data access performance point of view.

High-Performance Java Persistence – Chapter 11 – Relationships

Part 2, Chapter 11 Every new chapter of my book is released right after it’s being completed, so the reader doesn’t have to wait for the whole part to be finished to get access to new material. Table of content This chapter explains JPA relationships from a data access performance point of view.