How to cache non-existing entity fetch results with JPA and Hibernate

Introduction

Sergey Chupov asked me a very good question on Twitter:

In this article, I’m going to show you how to cache null results when using JPA and Hibernate.

Continue reading “How to cache non-existing entity fetch results with JPA and Hibernate”

How to use the Hibernate Query Cache for DTO projections

Introduction

On the Hibernate forum, I noticed the following question which is about using the Hibernate Query Cache for storing DTO projections, not entities.

While caching JPQL queries which select entities is rather typical, caching DTO projections is a lesser-known feature of the Hibernate second-level Query Cache.

Continue reading “How to use the Hibernate Query Cache for DTO projections”

A beginner’s guide to the high-performance-java-persistence GitHub repository

Introduction

When I started writing High-Performance Java Persistence, I realized I needed a GitHub repository to host all the test cases I needed for the code snippets in my book, and that’s how the high-performance-java-persistence GitHub repository was born.

The high-performance-java-persistence GitHub repository is a collection of integration tests and utilities so that you can test JDBC, JPA, Hibernate and jOOQ features with the utmost ease.

Continue reading “A beginner’s guide to the high-performance-java-persistence GitHub repository”

FlexyPool 2 has been released

Introduction

I’m happy to announce you that FlexyPool 2 has just been released!

FlexyPool 2 released

I started FlexyPool in 2014 because, at the time, I was working as a software architect on a large real-estate platform and we were about to launch the system into production. Because the system was split into multiple modules, we needed a way to figure out the right pool size for each module.

To make matters worse, the front-end nodes could be auto-scaled, so we needed monitoring and same fallback mechanisms in case our initial assumptions did not hold anymore.

And that’s how FlexyPool was born.

Continue reading “FlexyPool 2 has been released”