Checking Which Java Version Is Running in Eclipse
1. Overview When working with Java in the Eclipse IDE, ensuring the correct Java version is essential for compiling and executing code accurately. Eclipse simplifies this process by providing...
View ArticleContinue With Transaction After Exception in JPA
1. Overview The transaction mechanism in JPA is a powerful tool that ensures atomicity and data integrity by either committing all changes or rolling them back in case of an exception. However, there...
View ArticleHow to Test Spring Application Events
1. Overview In this tutorial, we’ll discuss testing code that uses Spring application events. We’ll start by manually creating test utilities that help us publish and collect application events for...
View ArticleFix the PSQLException: “FATAL: sorry, too many clients already”
1. Overview In this tutorial, let’s discuss the PostgreSQL exception, FATAL: sorry, too many clients already. Generally, the PostgreSQL server throws this error when it cannot accept a connection...
View ArticleConvert a Phone Number in Words to Number with Java
1. Overview We may wish to process a telephone number expressed as text. Perhaps we have received a telephone number via a speech-to-text interface. In this tutorial, we’ll look at an algorithm for...
View ArticleThe Difference Between Throwing an Exception and Mono.error() in Spring Webflux
1. Overview Error handling is a critical aspect of reactive programming with Spring WebFlux. Developers usually rely on two primary methods for error handling: throwing exceptions or using the...
View ArticleIntroduction to Light-4J
1. Introduction Traditional frameworks, while robust, often introduced complexities that challenged agility. Modern development demands frameworks that aren’t just powerful but nimble. Lightweight...
View ArticleHow to Scale a Bufferedimage in Java?
1. Introduction In this tutorial, we’ll go over how to rescale an image using basic Java APIs. We’ll show how to load and save the image from/to a file and explain some technical aspects of the...
View ArticleJava Weekly, Issue 537
1. Spring and Java >> Expressive REST Resources with Java Records and Jakarta REST [blog.payara.fish] Java Records As DTOs: concise, immutable, readable, expressive, and more secure. Yeah....
View ArticleNew Features in Java 21
1. Overview Oracle released Java 21 on September 19, 2023. It’s the latest Java LTS release after Java 17. This article will discuss the new features and enhancements added to Java 21. 2. List of JEPs...
View ArticleSet Matrix Elements to Zero in Java
1. Overview Matrices are fundamental data structures used in various computer science, mathematics, and engineering fields. In some scenarios, we might need to set certain matrix elements to zero based...
View ArticleJoin Two Tables Using jOOQ
1. Introduction jOOQ (Java Object Oriented Querying) is a powerful library that simplifies database interaction in Java by enabling us to write SQL queries in an object-oriented manner. Joining tables...
View ArticleCreate and Run Apache JMeter Test Scripts via Java Program
1. Introduction Apache JMeter is an open-source Java-based application designed to analyze and measure the performance of web applications. It allows a tester to simulate heavy loads on the servers,...
View ArticleIntro to the Apache Commons Compress Project
1. Introduction In this tutorial, we’ll learn how to use Apache Commons Compress to compress, archive, and extract files. We’ll also learn about its supported formats and some of its limitations. 2....
View ArticleGet the Response Body in Spring Boot Filter
1. Introduction In this article, we’ll explore how to retrieve the response body from a ServletResponse in a Spring Boot filter. In essence, we’ll define the problem, and then we’ll use a solution that...
View ArticleCan @Transactional and @Async Work Together?
1. Introduction In this article, we’ll examine the compatibility between the @Transactional and @Async annotations of the Spring framework. 2. Understanding @Transactional and @Async The @Transactional...
View ArticleIntroduction to Brave
1. Introduction In modern software development, where microservices architectures are very popular, the ability to track and analyze the flow of requests across various services is essential. Because...
View ArticleCode Coverage vs. Test Coverage
1. Overview Software testing helps us ensure our code works correctly, which makes it an important part of the development process. When discussing testing, terms such as code coverage and test...
View ArticleConverting a Java Project/Module Into a Maven Project/Module In IntelliJ IDEA
1. Overview IntelliJ IDEA stands out as a robust integrated development environment (IDE). It provides robust features to streamline the development workflow. A common task a developer may encounter is...
View ArticlePass a Class as a Parameter in Java
1. Introduction When working with Java programming, there are situations where we may need to pass a class as a parameter, enabling dynamic behavior and flexibility in our code. In this tutorial, we’ll...
View Article