Guide to ThreadLocalRandom in Java 1. Overview Generating random values is a very common task. This is why Java provides the java.util.Random class. However, this class doesn’t perform well in a multi-threaded environment. In a simplified way, the reason for poor performance of Random in a multi-threaded environment is due… Continue Reading java-thread-local-random

JPA/Hibernate Projections 1. Overview In this tutorial, we’ll learn how to project entity properties using JPA and Hibernate. 2. The Entity First, let’s look at the entity we will be using throughout this article: @Entity public class Product { @Id private long id; private String name; private String description; private… Continue Reading jpa-hibernate-projections