24 Apr 2026

feedDZone Java Zone

Preventing Prompt Injection by Design: A Structural Approach in Java

The Problem With How We're Sending Data to AI Models

Most Java applications that integrate with AI models do something like this:

Java
String userInput = request.getParameter("topic");
String prompt = "Summarize the following topic for a financial analyst: " + userInput;


24 Apr 2026 8:00pm GMT

22 Apr 2026

feedDZone Java Zone

The Invisible OOMKill: Why Your Java Pod Keeps Restarting in Kubernetes

Imagine deploying a robust Spring Boot microservice that passes every integration test in your local Docker environment, only to watch it crash loop endlessly shortly after launching to your Kubernetes production cluster. Everything ran fine on your laptop, but in the live environment, your pods start terminating en masse. Requests to your critical endpoints begin failing with 503 errors. Panic sets in as your service, the backbone of your transaction pipeline, is effectively brought down by an invisible foe.

In our recent migration to a cloud-native architecture, the culprit was a hidden memory configuration issue involving how the Java Virtual Machine interacts with Kubernetes container limits. A tiny mismatch in resource allocation, something that went unnoticed during development, led to a chain reaction of OOMKilled events in production.

22 Apr 2026 2:00pm GMT

20 Apr 2026

feedDZone Java Zone

From APIs to Event-Driven Systems: Modern Java Backend Design

The outage happened during our biggest sales event of the year. Our order processing system ground to a halt. Customers could add items to their carts, but checkout failed repeatedly. The engineering team scrambled to check the logs. We found a chain of synchronous REST API calls that had collapsed under load. Service A called Service B, which called Service C. When Service C slowed down due to database locks, the latency rippled back up the chain. Service A timed out. Service B timed out. The entire order pipeline froze. We were losing revenue by the minute. This incident forced us to rethink our architecture. We realized that synchronous APIs were not suitable for every interaction. We needed to decouple our services. We needed an event-driven system.

In this article, I will share how we migrated from a tightly coupled API architecture to an event-driven design using Java and Kafka. I will explain the specific challenges we faced during the transition. I will detail the code changes required to handle asynchronous communication. This is not a theoretical discussion about microservices. It is a record of the practical steps we took to stabilize our platform. Building resilient backend systems requires more than just choosing the right tools. It requires understanding the trade-offs between consistency and availability.

20 Apr 2026 5:00pm GMT

Jakarta EE Glossary: The Terms Every Java Engineer Should Actually Understand

Most developers don't have a problem writing code. They have a problem understanding the platform they are building on.

And that difference shows up later - in architectural decisions, debugging complexity, vendor lock-in, and, ultimately, career growth.

20 Apr 2026 3:30pm GMT

17 Apr 2026

feedDZone Java Zone

Training a Neural Network Model With Java and TensorFlow

Training, exporting, and using a TensorFlow model is a great way to gain a low-level understanding of the building blocks of the LLMs fueling the AI revolution.

Since I am comfortable with using Java, I will use it to define a neural network (NN) model, train it, export it in a language-agnostic format, and then import it into a Spring Boot project. Now, doing all this from scratch would not be advisable, since there are many advances in the field of NN that would take a long time to properly understand and implementing them would be difficult and error-prone. So, to both learn about NNs and make implementation easy, we will use a proven software platform: TensorFlow.

17 Apr 2026 6:00pm GMT

Multithreading in Modern Java: Advanced Benefits and Best Practices

Multithreading has always been one of core strengths of Java over years. From the early days of the JVM, Java was designed with built-in support for concurrent programming. But for many years, writing scalable multithreaded applications required careful tuning, thread pool management and constant attention to synchronization.

In the latest Java versions, the concurrency model has evolved significantly. Modern Java introduces improvements such as Virtual Threads, better executors, improved fork-join performance and more structured concurrency approaches. These features allow developers to build highly concurrent applications with simpler code and fewer scalability limitations.

17 Apr 2026 5:00pm GMT

16 Apr 2026

feedDZone Java Zone

Optimizing Java Back-End Performance Profiling and Best Practices

The dashboard turned red at weekday. Our order processing API latency jumped from fifty milliseconds to five seconds. Customer support tickets flooded in. Users reported timeouts during checkout. The infrastructure team scaled up the Kubernetes pods, but the issue persisted. CPU usage sat at 100 percent across all nodes. We were throwing hardware at a software problem. This approach failed miserably.

In this article, I will share how we diagnosed the bottleneck. I will explain the profiling tools we used. I will detail the code changes that restored performance. This is not a theoretical guide. It is a record of a real production incident and the steps we took to resolve it.

16 Apr 2026 12:00pm GMT

14 Apr 2026

feedDZone Java Zone

Faster Releases With DevOps: Java Microservices and Angular UI in CI/CD

In modern DevOps workflows, automating the build-test-deploy cycle is key to accelerating releases for both Java-based microservices and an Angular front end. Tools like Jenkins can detect changes to source code and run pipelines that compile code, execute tests, build artifacts, and deploy them to environments on AWS. A fully automated CI/CD pipeline drastically cuts down manual steps and errors.

As one practitioner notes, Jenkins is a powerful CI/CD tool that significantly reduces manual effort and enables faster, more reliable deployments. By treating the entire delivery pipeline as code, teams get repeatable, versioned workflows that kick off on every Git commit via webhooks or polling.

14 Apr 2026 1:00pm GMT

13 Apr 2026

feedDZone Java Zone

How to Test a GET API Request Using REST-Assured Java

Testing GET requests is a fundamental part of API automation, ensuring that endpoints return the expected data and status codes. With REST Assured in Java, sending GET requests with query and path parameters, extracting data, verifying the status code, and validating the response body is quite simple.

This tutorial walks through practical approaches to efficiently test GET APIs and build reliable automated checks, including:

13 Apr 2026 2:30pm GMT

10 Apr 2026

feedDZone Java Zone

Apache Spark 3 to Apache Spark 4 Migration: What Breaks, What Improves, What's Mandatory

Apache Spark 4.0 represents a major evolutionary leap in the big data processing ecosystem. Released in 2025, this version introduces significant enhancements across SQL capabilities, Python integration, connectivity features, and overall performance. However, with great power comes great responsibility - migrating from Spark 3.x to Spark 4.0 requires careful planning due to several breaking changes that can impact your existing workloads.

This comprehensive guide walks you through everything you need to know about the Spark 3 to Spark 4 migration journey. We'll cover what breaks in your existing code, what improvements you can leverage, and what changes are mandatory for a successful transition. Whether you're a data engineer, platform architect, or data scientist, this article provides practical insights to ensure a smooth migration path.

10 Apr 2026 8:00pm GMT

09 Apr 2026

feedDZone Java Zone

Using Java for Developing Agentic AI Applications: The Enterprise-Ready Stack in 2026

As agentic AI shifts from prototypes to enterprise production, Java emerges as a powerful alternative to Python-centric stacks. This article looks into building robust agentic applications using LangChain4j for orchestration, Quarks for high-performance deployment, Model Context Protocol (MCP) for standardized tool and data access, and OpenTelemetry for comprehensive observability. Through practical code examples - including tool definitions, agent creation with memory, RAG integration, and production patterns - the guide demonstrates Java's advantages in type safety, low-latency execution, deep system integration, and audit-ready tracing. This is ideal for developers seeking scalable, reliable agentic solutions in mission-critical environments.

Agentic AI - autonomous systems that reason, plan, use tools, remember context, and execute complex multi-step tasks - is moving from experimental prototypes to production workloads in enterprises. While Python ecosystems (LangChain, LlamaIndex, CrewAI) led the early wave, Java is emerging as a serious contender for mission-critical agentic applications.

09 Apr 2026 4:00pm GMT

Translating OData Queries to MongoDB in Java With Jamolingo

Modern APIs often need to support dynamic filtering, sorting, and pagination without creating dozens of custom endpoints. One of the most widely used standards for this is OData (Open Data Protocol). OData has established itself as a powerful standard for building and consuming RESTful APIs. It provides a uniform way to query and manipulate data, offering clients unparalleled flexibility through system query options like $filter, $select, and $expand.

Example:

09 Apr 2026 3:00pm GMT

Tracking Dependencies Beyond the Build Stage

When working on modern software, a developer will often use hundreds or thousands of dependencies. Đšeeping an accurate and consistent bill of materials is essential for license compliance and for security.

Motivation

In a large organization, the scope of dependencies review given by build-time scanning has some limitations.

09 Apr 2026 2:00pm GMT

08 Apr 2026

feedDZone Java Zone

Enterprise Java Applications: A Practical Guide to Securing Enterprise Applications with a Risk-Driven Architecture

Enterprise Java applications still serve business-critical processes but are becoming vulnerable to changing security threats and regulatory demands. Traditional compliance-based security methods tend to respond to audits or attacks, instead of stopping them. This paper introduces a risk-based security architecture, which focuses on protection according to the impact of the business, the probability of the threat, and exposure. The threat modeling, dependency risk analysis, and layered security controls help organizations to minimize the attack surfaces beforehand without impacting on performance and delivery velocity. The strategy is explained with the help of real-life examples of enterprise Java to facilitate its use in practice.

Intended Audience

The audience targeted in the article is those an enterprise architect, senior Java developer, security architect, and DevSecOps teams who are required to design, modernize or secure large-scale Java applications. In recent years, there are a number of breaches of enterprises that have not been initiated by a zero-day exploit but a known vulnerability, which has not been prioritized e.g. an outdated library, an open API, or a poorly configured integration In a number of instances, the organizations were technically compliant but still exposed because of the homogenous, checklist-driven security measures that did not concentrate on the high-risk elements.

08 Apr 2026 11:00pm GMT

31 Mar 2026

feedDZone Java Zone

Memory Optimization and Utilization in Java 25 LTS: Practical Best Practices

Memory tuning in Java has evolved over years and whenever each version was released, we anticipate some magic. If you worked with Java 6 or 7, you probably remember spending hours tweaking PermGen, experimenting with CMS flags, and nervously watching GC logs in production. But with Java 25, Memory Optimization and Utilization are more mature.

Modern Java gives us better garbage collectors, improved container awareness, stronger tooling, and smarter runtime ergonomics. But despite all that progress, memory optimization is something that you can't ignore. In a cloud-native environment where every gigabyte costs money, memory efficiency directly affects both performance and money spent on infrastructure as well.

In this article I am trying to summarize some of the best practices for memory utilization, so developers can use it as a reference guide.

1. Start with Measurement, Not Assumptions

The most common mistake that we could usually see is increasing heap size without understanding allocation patterns. A bigger heap often delays a problem rather than solving it.

31 Mar 2026 3:00pm GMT

30 Mar 2026

feedDZone Java Zone

Data-Driven API Testing in Java With REST Assured and TestNG: Part 5

In the previous articles, we discussed how to perform data-driven API automation testing with different approaches, including object arrays, iterators, CSV files, and JSON files.

An Excel file can also be used to perform data-driven API testing. It allows testers to store multiple test data in one place, where we can easily add, update, or remove test cases without changing the automation code. It allows non-technical members, such as Business Analysts and Product owners, to understand and edit the test data to perform robust testing.

30 Mar 2026 4:30pm GMT