Mr.Humorous 🥘

Nothing is impossible, the word itself says 'I'm possible'❗️ 💪

Daemon Threads in Java

Introduction to Daemon Threads

1. Overview In this short article, we’ll have a look at daemon threads in Java and see what can they be used for. We’ll also explain the difference between daemon threads and user threads. 2. Diff...

Java Annotation Processing and Creating a Builder

Examples of Java Annotation Processor

1. Introduction This article is an intro to Java source-level annotation processing and provides examples of using this technique for generating additional source files during compilation. 2. Appl...

Hibernate Entity Lifecycle

Understanding the lifecycle of Hibernate entity

1. Overview Every Hibernate entity naturally has a lifecycle within the framework – it’s either in a transient, managed, detached or deleted state. Understanding these states on both conceptual an...

Event Sourcing Pattern

Example for Event Sourcing Pattern

Context A service typically need to atomically update the database and publish messages/events. For example, perhaps it uses the Saga pattern. In order to be reliable, each step of a saga must atom...

Design Patterns for Microservices

Introduction to various Microservice's design patterns

1. Overview Microservice architecture has been built on the following principles: Scalability Availability Resiliency Independent, autonomous Decentralized governance Failure isolation...

Command Query Responsibility Segregation (CQRS) Pattern

Example for CQRS Pattern

Context You have applied the Microservices architecture pattern and the Database per service pattern. As a result, it is no longer straightforward to implement queries that join data from multiple ...

Type Erasure in Java Explained

Examples of Type Erasure

1. Overview In this quick article, we’ll discuss the basics of an important mechanism in Java’s generics known as type erasure. 2. What is Type Erasure? Type erasure can be explained as the proces...

Transactions with Spring and JPA

Introduction to Spring Transactions

1. Overview This tutorial will discuss the right way to configure Spring Transactions, how to use the @Transactional annotation and common pitfalls. For a more in-depth discussion on the core pers...

Spring Events

Undetstanding Spring Events

1. Overview Events are one of the more overlooked functionalities in the framework but also one of the more useful. And – like many other things in Spring – event publishing is one of the capabilit...

Introduction to Spring Data Redis

Use Spring Data with Redis

1. Overview This article is an introduction to Spring Data Redis, which provides the abstractions of the Spring Data platform to Redis – the popular in-memory data structure store. Redis is driven...