How to use the Hibernate Query Cache for DTO projections


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


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


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”

Hibernate HSQLDB ARRAY Type


Inspired by this comment on my blog, I decided to write an article about implementing a custom Hibernate type to support HSQLDB ARRAY column types.

As previously explained, although Hibernate does not support database ARRAY column types by default, you can easily implement a custom Hibernate ArrayType. While the previous solution worked on PostgreSQL, in this article, you are going to see that it is fairly easy to adapt it to HSQLDB.

Continue reading “Hibernate HSQLDB ARRAY Type”