09 Sep 2025

feedDZone Java Zone

Secure Your Spring Boot Apps Using Keycloak and OIDC

In this blog, we will take a closer look at Spring Security, specifically in combination with Keycloak using OpenID Connect, all supported with examples and unit tests. Enjoy!

Introduction

Many applications are supported by means of authentication and authorization. However, it is also something software developers find difficult to grasp. In this blog, Spring Security is introduced, which is Spring's solution for adding security to your Spring applications. By means of examples and unit tests, you will learn the annotations and Spring classes. The end goal is to set up an application using OpenID Connect in combination with Keycloak. An introduction to OpenID Connect and Keycloak can be found in a previous blog. It is advised to read this blog if you are not yet familiar with the concepts.

09 Sep 2025 2:00pm GMT

02 Sep 2025

feedDZone Java Zone

Monitoring Java Microservices on EKS Using New Relic APM and Kubernetes Metrics

Amazon EKS makes running containerized applications easier, but it doesn't give you automatic visibility into JVM internals like memory usage or garbage collection. For Java applications, observability requires two levels of integration:

New Relic provides both via Helm for infrastructure metrics, and a lightweight Java agent for full JVM observability.

02 Sep 2025 6:00pm GMT

Prototype for a Java Database Application With REST and Security

Many times, while developing at work, I needed a template for a simple application from which to start adding specific code for the project at hand.

In this article, I will create a simple Java application that connects to a database, exposes a few rest endpoints and secures those endpoints with role based access.

02 Sep 2025 4:00pm GMT

01 Sep 2025

feedDZone Java Zone

Exploring QtJambi: A Java Wrapper for Qt GUI Development—Challenges and Insights

I recently experimented with QtJambi, a Java wrapper for the well-known Qt C++ library used to build GUIs. Here are some initial thoughts, remarks and observations:

Notable Applications Built With QtJambi

Notable applications built with QtJambi are few. One example is the Interactive Brokers desktop trading platform (IBKR Desktop), which uses QtJambi for its user interface.

01 Sep 2025 5:00pm GMT

26 Aug 2025

feedDZone Java Zone

Java 21 Virtual Threads vs Cached and Fixed Threads

Introduction

Concurrent programming remains a crucial part of building scalable, responsive Java applications. Over the years, Java has steadily enhanced its multithreaded programming capabilities. This article reviews the evolution of concurrency from Java 8 through Java 21, highlighting important improvements and the impactful addition of virtual threads introduced in Java 21.

Starting with Java 8, the concurrency API saw significant enhancements such as Atomic Variables, Concurrent Maps, and the integration of lambda expressions to enable more expressive parallel programming.

26 Aug 2025 3:00pm GMT

20 Aug 2025

feedDZone Java Zone

Filtering Java Stack Traces With MgntUtils Library

Introduction: Problem Definition and Suggested Solution Idea

This article is a a technical article for Java developers that suggest a solution for a major pain point of analyzing very long stack traces searching for meaningful information in a pile of frameworks related stack trace lines. The core idea of the solution is to provide a capability to intelligently filter out irrelevant parts of the stack trace without losing important and meaningful information. The benefits are two-fold:

1. Making stack trace much easier to read and analyze, making it more clear and concise

20 Aug 2025 8:00pm GMT

15 Aug 2025

feedDZone Java Zone

Java JEP 400 Explained: Why UTF-8 Became the Default Charset

A JDK Enhancement Proposal (JEP) is a formal process used to propose and document improvements to the Java Development Kit. It ensures that enhancements are thoughtfully planned, reviewed, and integrated to keep the JDK modern, consistent, and sustainable over time. Since its inception, many JEPs have introduced significant language and runtime features that shape the evolution of Java. One such important proposal, JEP 400, introduced in JDK 18 in 2022, standardizes UTF-8 as the default charset, addressing long-standing issues with platform-dependent encoding and improving Java's cross-platform reliability.

Traditionally, Java's I/O API, introduced in JDK 1.1, includes classes like FileReader and FileWriter that read and write text files. These classes rely on a Charset to correctly interpret byte data. When a charset is explicitly passed to the constructor, like in:

15 Aug 2025 7:00pm GMT

12 Aug 2025

feedDZone Java Zone

Scoped Values: Revolutionizing Java Context Management

In an application meant for concurrent execution need of sharing data (or context) between threads is imperative. The available design choices are to pass the context as method parameter(s) or enable the context to be universally accessible (viz. global variable or equivalent).

While former choice (i.e. context as method argument) is easiest it doesn't scale well. As the application evolves, the context too grows and thus the method parameters. Moreover, the method is required to accept parameters which aren't utilized by itself directly but instead some method deep down the call hierarchy. Thus, overall data flow isn't clean or intuitive. In case the context is mutable any of the callee potentially could corrupt the context. Identifying this rouge behavior is unpleasant at best.

12 Aug 2025 12:00pm GMT

11 Aug 2025

feedDZone Java Zone

Testing Approaches for Java Enterprise Applications With Jakarta NoSQL and Jakarta Data

When discussing software development and its history, we often hear quotes emphasizing the importance of testing; however, in practice, we usually prioritize it as the last step, perhaps ahead of documentation. Without proper testing, ensuring the quality of your software is nearly impossible. Tests work as a safety certification, catching issues early and ensuring that your software behaves as expected. Despite their clear advantages - improved code quality, easier refactoring, and better adaptability for future changes - tests are often neglected.

The reality is that testing is a long-term investment, and many software engineers and tech leaders tend to underestimate its importance. This article aims to highlight why testing should be an integral part of your development workflow, particularly when working with Jakarta EE.

11 Aug 2025 12:00pm GMT

07 Aug 2025

feedDZone Java Zone

Introduction to Data-Driven Testing With JUnit 5: A Guide to Efficient and Scalable Testing

When discussing the history of software development, we can observe an increase in software complexity, characterized by more rules and conditions. When it comes to modern applications that rely heavily on databases, testing how the application interacts with its data becomes equally important. It is where data-driven testing plays a crucial role.

Data-driven testing helps increase software quality by enabling tests with multiple data sets, which means the same test runs multiple times with different data inputs. Automating these tests also ensures scalability and repeatability across your test suite, reducing human error, boosting productivity, saving time, and guaranteeing that the same mistake doesn't happen twice.

07 Aug 2025 1:00pm GMT

How to Configure a Jenkins Job for a Maven Project

Jenkins is a widely used automation server that plays a big role in modern software development. It helps teams streamline their continuous integration and continuous delivery (CI/CD) processes by automating tasks like building, testing, and deploying applications.

One of the key strengths of Jenkins is its flexibility. It easily integrates with a wide range of tools and technologies, making it adaptable to different project needs.

07 Aug 2025 12:00pm GMT

06 Aug 2025

feedDZone Java Zone

jBPM as AI Orchestration Platform

Disclaimer: The views expressed in this document reflect the author's subjective perspective on the current and potential capabilities of jBPM.

This text presents jBPM as a platform for orchestrating external AI-centric environments, such as Python, used for designing and running AI solutions. We will provide an overview of jBPM's most relevant functionalities for AI orchestration and walk you through a practical example that demonstrates its effectiveness as an AI orchestration platform:

06 Aug 2025 7:00pm GMT

04 Aug 2025

feedDZone Java Zone

How to Build an MCP Server With Java SDK

A previous article [Resource 1] described how an open-source PostgreSQL Model Context Protocol server can be plugged into an AI host and provide additional database context to the interacting LLM. Moreover, quite a few interesting insights on the considered data were inferred by the LLM when natural language prompts were written and responded to.

The current article uses the exact same database schema and does a similar experiment, the only significant difference being that the MCP Server is developed from scratch, using the available Java SDK, without involving any additional frameworks.

04 Aug 2025 12:00pm GMT

30 Jul 2025

feedDZone Java Zone

Immutable Objects Using Record in Java

It is often useful to have objects that, once created, don't change their content. To see a complete description on how to build such class, you can read my previous article "Immutable Objects in Java".

Let's imagine we want to build a PersonClass with two fields: firstName and lastName. To create immutable instances, this class must:

30 Jul 2025 8:00pm GMT

25 Jul 2025

feedDZone Java Zone

Smart-Doc: Generating gRPC API Documentation in Java Projects

Foreword

In modern Java microservices, gRPC simplifies inter-service communication with its efficient binary protocol and multi-language support. However, maintaining gRPC API documentation can be challenging as projects grow. Among various AI tools, smart-doc stands out as the optimal solution for generating gRPC API documentation in Java projects.

Advantages of Smart-Doc in Java Projects

1. Fast Speed

Smart-doc is designed to quickly scan code and generate documentation without additional runtime dependencies. It directly extracts .proto files, compiles them into Java code using protoc, and then generates documentation by parsing the Java code and comments. This process is much faster than AI tools.

25 Jul 2025 1:00pm GMT

23 Jul 2025

feedDZone Java Zone

Undocumented Java 16 Feature: The End-of-File Comment

While working on some code where I wanted to obscure parts of it using Unicode escapes instead of the actual source, I accidentally stumbled upon an undocumented feature that's been around since Java 16: what I call the end-of-file comment.

In Java, we typically have three types of comments:

23 Jul 2025 6:00pm GMT