<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by KD on Medium]]></title>
        <description><![CDATA[Stories by KD on Medium]]></description>
        <link>https://medium.com/@dkamalkanth?source=rss-5974ae0c7855------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*CE_aRxnwwKxhpz6S.jpg</url>
            <title>Stories by KD on Medium</title>
            <link>https://medium.com/@dkamalkanth?source=rss-5974ae0c7855------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 15:07:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dkamalkanth/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Hibernate Debugger vs JPA Buddy: Two IntelliJ Plugins Every Java Developer Should Know]]></title>
            <link>https://medium.com/@dkamalkanth/hibernate-debugger-vs-jpa-buddy-two-intellij-plugins-every-java-developer-should-know-a5d1e8f9a9a8?source=rss-5974ae0c7855------2</link>
            <guid isPermaLink="false">https://medium.com/p/a5d1e8f9a9a8</guid>
            <category><![CDATA[intellij-plugin]]></category>
            <category><![CDATA[intellij-idea]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[hibernate]]></category>
            <dc:creator><![CDATA[KD]]></dc:creator>
            <pubDate>Thu, 05 Nov 2026 14:20:39 GMT</pubDate>
            <atom:updated>2026-11-05T14:23:36.782Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Working with Spring Boot, JPA, and Hibernate is part of everyday life for many Java developers.</p><p>We create entities, define relationships, write JPQL queries, and interact with databases through Hibernate.</p><p>But two common challenges often slow us down:</p><ul><li>Understanding what SQL Hibernate generates at runtime.</li><li>Managing JPA entities, relationships, and database mappings efficiently.</li></ul><p>IntelliJ IDEA provides a powerful ecosystem of plugins that can help address these challenges.</p><p>In this article, we will explore two useful tools: <strong>Hibernate Debugger and JPA Buddy</strong>.</p><h3>1. Hibernate Debugger: Understand What Hibernate Does at Runtime</h3><p>One of the biggest challenges when working with Hibernate is understanding how Java code translates into SQL.</p><p>Consider this example:</p><pre>public List&lt;Employee&gt; findEmployeesByDepartment(<br>        Integer departmentId) {</pre><pre>    return entityManager.createQuery(<br>        &quot;SELECT e FROM Employee e WHERE e.departmentId = :id&quot;,<br>        Employee.class<br>    )<br>    .setParameter(&quot;id&quot;, departmentId)<br>    .getResultList();<br>}</pre><p>Hibernate translates JPQL into SQL before executing it against the database.</p><p>When investigating unexpected SQL, developers traditionally rely on SQL logs, Hibernate configuration, and database monitoring tools.</p><p>Hibernate Debugger helps investigate the relationship between application code and Hibernate-generated queries.</p><h3>What makes it useful?</h3><ul><li>Inspect Hibernate-generated SQL.</li><li>Understand where queries originate.</li><li>Investigate query parameters.</li><li>Navigate between query execution and source code.</li></ul><p><strong>Practical use cases:</strong></p><ul><li>Investigating unexpected SQL.</li><li>Understanding complex Hibernate queries.</li><li>Debugging persistence-layer behavior.</li><li>Investigating performance problems.</li></ul><h3>2. JPA Buddy: Improve JPA Development Productivity</h3><p>JPA Buddy focuses on making JPA and Hibernate development easier.</p><p>It helps developers work with entities, relationships, DTOs, and database migrations.</p><h3>Key capabilities</h3><ul><li>Generate JPA entities.</li><li>Create entity relationships.</li><li>Generate DTOs and MapStruct mappings.</li><li>Assist with database migration scripts.</li><li>Work with JPA and Hibernate mappings.</li></ul><h3>Example</h3><p>Consider a simple relationship:</p><pre>@Entity<br>public class Employee {</pre><pre>    @Id<br>    @GeneratedValue<br>    private Long id;</pre><pre>    @ManyToOne<br>    private Department department;<br>}</pre><p>JPA Buddy can help developers create and maintain entity mappings without manually writing every piece of boilerplate code.</p><h3>3. Hibernate Debugger vs JPA Buddy</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*jwuP1Em08v7cxGqYri4J8Q.png" /></figure><h3>4. When Should Java Developers Use Them?</h3><p>Use Hibernate Debugger when investigating runtime Hibernate behavior.</p><p>Use JPA Buddy when designing and maintaining your persistence layer.</p><p>For larger Spring Boot microservices, having both tools available can improve development productivity.</p><h3>5. Conclusion</h3><p>Hibernate and JPA are powerful technologies, but understanding their runtime behavior and maintaining complex entity models can sometimes be challenging.</p><p>Hibernate Debugger helps developers understand what happens when Hibernate executes queries.</p><p>JPA Buddy helps developers build and maintain the persistence layer more efficiently.</p><p>Both tools are worth exploring for developers working with Spring Boot, Hibernate, and relational databases.</p><p><strong>Happy coding!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a5d1e8f9a9a8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI Model vs AI Agent vs AI Harness: Understanding the Key Differences with Practical Examples]]></title>
            <link>https://medium.com/@dkamalkanth/ai-model-vs-ai-agent-vs-ai-harness-understanding-the-key-differences-with-practical-examples-af63323628a7?source=rss-5974ae0c7855------2</link>
            <guid isPermaLink="false">https://medium.com/p/af63323628a7</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[ai-engineering]]></category>
            <dc:creator><![CDATA[KD]]></dc:creator>
            <pubDate>Mon, 02 Nov 2026 16:17:10 GMT</pubDate>
            <atom:updated>2026-11-02T16:17:10.452Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>In the world of Artificial Intelligence, we frequently hear terms like AI Models, AI Agents, and AI Harnesses.</p><p>Although these terms are closely related, they represent different parts of an AI-powered system.</p><p>For someone starting their AI engineering journey, understanding these differences is important.</p><p>Let’s start with a simple question.</p><p>Imagine asking an AI assistant:</p><p>“Analyze my Spring Boot application, identify the root cause of an error, fix the issue, and run the unit tests.”</p><p>How does an AI system actually accomplish this?</p><p>Does the AI model do everything by itself? Is an AI agent responsible for the execution? What role does an AI harness play?</p><p>To understand this, let’s explore each concept individually.</p><h3>1. What Is an AI Model?</h3><p>An AI Model is the intelligence behind an AI-powered application.</p><p>It is trained on data and can understand inputs, recognize patterns, generate responses, and perform reasoning tasks.</p><p>Examples of popular AI models include:</p><ul><li>OpenAI GPT models</li><li>Anthropic Claude models</li><li>Google Gemini models</li><li>Meta Llama models</li></ul><h3>What can an AI model do?</h3><p>An AI model can:</p><ul><li>Answer technical questions.</li><li>Generate Java code.</li><li>Explain programming concepts.</li><li>Analyze error messages.</li><li>Summarize documents.</li><li>Suggest performance improvements.</li></ul><h3>Practical example</h3><p>Suppose you provide the following Java code:</p><pre>public User getUser(Long userId) {<br>    return userRepository.findById(userId).get();<br>}</pre><p>You ask the AI model:</p><p>“What happens if the user does not exist?”</p><p>The model can explain that Optional.get() throws a NoSuchElementException when the Optional is empty.</p><p>It might suggest a safer implementation:</p><pre>public User getUser(Long userId) {<br>    return userRepository.findById(userId)<br>            .orElseThrow(() -&gt;<br>                new UserNotFoundException(<br>                    &quot;User not found: &quot; + userId<br>                )<br>            );<br>}</pre><p>The model understands the problem and generates a solution.</p><p>However, generating code is different from actually modifying your project and verifying the result.</p><p>That brings us to the next concept.</p><h3>2. What Is an AI Agent?</h3><p>An AI Agent is a system that uses an AI model to work toward a specific goal.</p><p>Unlike a traditional chatbot that primarily responds to questions, an AI agent can decide what actions are needed, use tools, observe the results, and continue working.</p><h3>What can an AI agent do?</h3><p>An AI agent can:</p><ul><li>Break a complex task into smaller steps.</li><li>Decide which tool to use.</li><li>Call external APIs.</li><li>Retrieve information from databases.</li><li>Read and modify files.</li><li>Execute commands.</li><li>Analyze execution results.</li><li>Continue working based on feedback.</li></ul><h3>Practical example</h3><p>Let’s continue with our Spring Boot application.</p><p>You ask:</p><p>“Find and fix the issue in the getUser() method.”</p><p>An AI coding agent might follow these steps:</p><ol><li>Locate the UserService.java file.</li><li>Read the getUser() implementation.</li><li>Identify the unsafe Optional handling.</li><li>Decide to replace Optional.get() with orElseThrow().</li><li>Modify the Java file.</li><li>Run the relevant unit tests.</li><li>Analyze the test results.</li><li>Report the changes.</li></ol><p>The important difference is that the agent doesn’t just generate a possible solution. It can take actions using the tools available to it.</p><p>An agent typically operates through a cycle:</p><p><strong>Observe → Reason → Act → Evaluate → Repeat</strong></p><p>This cycle allows an agent to work on tasks that require multiple steps.</p><h3>3. What Is an AI Harness?</h3><p>An AI Harness is the supporting infrastructure that enables an AI model or agent to operate in a controlled execution environment.</p><p>Think of the harness as the environment surrounding the AI agent.</p><p>It coordinates the resources and capabilities required to complete tasks.</p><h3>Key responsibilities of an AI harness</h3><p><strong>1. Context Management</strong></p><p>Provides relevant information to the model, such as source code, conversation history, and task instructions.</p><p><strong>2. Tool Integration</strong></p><p>Makes tools available to the agent, such as GitHub, databases, APIs, and command-line interfaces.</p><p><strong>3. Execution Environment</strong></p><p>Provides a way to execute commands, interact with files, and perform approved operations.</p><p><strong>4. Memory Management</strong></p><p>Maintains relevant information across interactions when supported.</p><p><strong>5. Security and Permissions</strong></p><p>Controls which resources and operations the agent can access.</p><p><strong>6. Validation and Error Handling</strong></p><p>Helps evaluate execution results, handle failures, and support retry workflows.</p><h3>Practical example</h3><p>When an AI agent needs to run:</p><pre>mvn clean test</pre><p>It needs an execution environment with access to the project and Maven.</p><p>The harness provides or coordinates that environment and manages the interaction between the agent and the execution tools.</p><p>Without these capabilities, the agent might only be able to suggest the Maven command instead of actually executing it.</p><h3>4. Understanding the Differences Through a Real-World Analogy</h3><p>Let’s use a simple analogy.</p><p>Imagine a software development team working on a Spring Boot application.</p><p>AI ConceptReal-World EquivalentResponsibilityAI ModelDeveloper’s brainThinks and analyzesAI AgentDeveloperDecides and performs tasksAI HarnessDevelopment environmentProvides tools and resources</p><p>Consider a developer fixing a production bug.</p><ul><li>The developer uses knowledge and experience to understand the issue.</li><li>The developer decides what changes are necessary.</li><li>The development environment provides an IDE, terminal, Git, build tools, and access to logs.</li></ul><p>Similarly:</p><ul><li>The AI model provides intelligence.</li><li>The AI agent uses that intelligence to perform tasks.</li><li>The AI harness provides the supporting environment and capabilities.</li></ul><h3>5. How Do They Work Together?</h3><p>Let’s look at a simplified architecture.</p><p>Imagine a user requests:</p><p>“Analyze the application logs, identify the root cause of the HTTP 500 error, fix the issue, and verify the solution.”</p><p>The workflow might look like this:</p><p><strong>Step 1: User Request</strong></p><p>The user provides a task to the AI-powered system.</p><p><strong>Step 2: AI Harness</strong></p><p>The harness provides relevant context, instructions, available tools, and execution permissions.</p><p><strong>Step 3: AI Model</strong></p><p>The model analyzes the request and determines the next appropriate action.</p><p><strong>Step 4: AI Agent</strong></p><p>The agent coordinates the task by selecting tools, executing actions, and evaluating results.</p><p><strong>Step 5: Tool Execution</strong></p><p>The agent uses available tools to inspect logs, read Java files, modify code, and run tests.</p><p><strong>Step 6: Validation</strong></p><p>The harness and agent use the execution results to determine whether the task was completed successfully.</p><p><strong>Step 7: Final Response</strong></p><p>The system reports the findings, code changes, and test results to the user.</p><p>The exact division of responsibilities varies across AI platforms and implementations. The harness and agent are not necessarily separate products.</p><h3>6. A Practical Example Using Java and Spring Boot</h3><p>Now let’s imagine building a simple AI-powered developer assistant.</p><p>Our objective is to create an assistant that can analyze Java applications and help developers fix common issues.</p><p>A possible architecture could include:</p><h3>Technology Stack</h3><ul><li>Java 21</li><li>Spring Boot</li><li>OpenAI or Claude API</li><li>MCP for standardized tool integration</li><li>GitHub API</li><li>Maven</li><li>Database connectivity</li></ul><h3>Responsibilities</h3><p><strong>AI Model</strong></p><p>Analyzes Java code, understands exceptions, and generates recommendations.</p><p><strong>AI Agent</strong></p><p>Determines which files to inspect, which tools to invoke, and what actions to perform.</p><p><strong>AI Harness</strong></p><p>Coordinates context, tool access, execution permissions, and validation.</p><h3>Example Workflow</h3><p>A developer submits:</p><p>“Check why the payment API is returning HTTP 500.”</p><p>The AI-powered assistant could:</p><ol><li>Retrieve relevant application logs.</li><li>Identify the failing endpoint.</li><li>Inspect the payment service implementation.</li><li>Analyze the exception.</li><li>Suggest a correction.</li><li>Apply the change in an authorized development environment.</li><li>Run Maven tests.</li><li>Generate a summary of the findings.</li></ol><p>This is where traditional backend development skills meet modern AI engineering.</p><h3>7. Where Do MCP and RAG Fit Into This Architecture?</h3><p>While exploring AI engineering, you will frequently encounter two additional terms: MCP and RAG.</p><p>They are related to AI applications, but they serve different purposes.</p><h3>MCP — Model Context Protocol</h3><p>MCP is an open protocol that standardizes how AI applications connect to external tools and data sources.</p><p>For example, an AI agent could use MCP to connect to:</p><ul><li>GitHub repositories.</li><li>File systems.</li><li>Databases.</li><li>External services.</li></ul><p>MCP helps standardize tool integration. It is not itself an AI model or an AI harness.</p><h3>RAG — Retrieval-Augmented Generation</h3><p>RAG is an approach that retrieves relevant external information and provides it to an AI model when generating a response.</p><p>For example, imagine asking:</p><p>“How does our payment-service retry mechanism work?”</p><p>Instead of relying only on the model’s training knowledge, a RAG-based application can retrieve relevant internal documentation and source-code information.</p><p>The retrieved information is then provided as context to the model.</p><p>In simple terms:</p><ul><li>AI Model: Provides intelligence.</li><li>AI Agent: Performs goal-oriented tasks.</li><li>AI Harness: Coordinates the execution environment.</li><li>MCP: Standardizes connections to external tools.</li><li>RAG: Retrieves relevant information to improve responses.</li></ul><h3>Conclusion</h3><p>AI Model, AI Agent, and AI Harness are three important concepts in modern AI engineering.</p><p>Although they work closely together, their responsibilities are different.</p><p>An AI model provides intelligence. An AI agent uses that intelligence to perform tasks. An AI harness provides the infrastructure, tools, context, and controls needed to make those tasks possible.</p><p>Understanding these concepts gives developers a strong foundation for exploring agentic AI systems and building production-ready AI applications.</p><p><strong>The future of AI engineering is not just about choosing a powerful model. It is about designing intelligent systems that can interact with tools, execute tasks, and deliver reliable results.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af63323628a7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Is an AI Harness? Understanding the Technology Behind AI Agents]]></title>
            <link>https://medium.com/@dkamalkanth/what-is-an-ai-harness-understanding-the-technology-behind-ai-agents-c5211703ab7b?source=rss-5974ae0c7855------2</link>
            <guid isPermaLink="false">https://medium.com/p/c5211703ab7b</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[ai-harness]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[KD]]></dc:creator>
            <pubDate>Mon, 02 Nov 2026 16:07:31 GMT</pubDate>
            <atom:updated>2026-11-02T16:07:31.863Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Artificial Intelligence has evolved significantly over the last few years. Initially, we used AI models primarily to generate text, answer questions, summarize documents, and write code.</p><p>Today, AI is moving beyond simply generating responses. AI systems can read files, execute commands, call APIs, analyze application logs, run tests, and even modify source code.</p><p>But have you ever wondered what makes all these activities possible?</p><p>The answer involves something called an <strong>AI Harness</strong>.</p><p>An AI model might be the brain behind an AI system, but the harness provides the environment, tools, instructions, and execution capabilities that allow the model to accomplish real-world tasks.</p><p>Let’s understand this concept from a software developer’s perspective.</p><h3>1. What Is an AI Harness?</h3><p>An AI Harness is the supporting infrastructure that surrounds an AI model and enables it to perform tasks beyond generating text.</p><p>It coordinates different components such as:</p><ul><li>Instructions and system prompts</li><li>Context and conversation history</li><li>Tool integrations and external APIs</li><li>File and code access</li><li>Execution environments</li><li>Memory management</li><li>Security and permissions</li><li>Validation and error handling</li></ul><p>In simple terms:</p><p><strong>An AI model provides intelligence, while an AI harness provides the environment and capabilities to use that intelligence effectively.</strong></p><p>For example, imagine asking an AI assistant:</p><p>“Analyze my Spring Boot application, identify a performance issue, fix it, and run the tests.”</p><p>An AI model can explain possible performance issues and suggest code changes.</p><p>However, to actually inspect source files, modify code, execute tests, and verify the results, it needs additional capabilities.</p><p>The AI harness coordinates those capabilities.</p><h3>2. Understanding AI Model vs AI Agent vs AI Harness</h3><p>These three terms are closely related, but they have different responsibilities.</p><h3>AI Model — The Brain</h3><p>An AI model, such as GPT or Claude, understands natural language, reasons about problems, and generates responses.</p><p>For example:</p><ul><li>Understand a Java exception.</li><li>Suggest a database optimization.</li><li>Generate Spring Boot code.</li><li>Explain a microservices architecture.</li></ul><p>The model itself does not automatically have access to your local files, database, or development environment.</p><h3>AI Agent — The Worker</h3><p>An AI agent uses an AI model to work toward a specific goal.</p><p>It can decide which actions to take, use available tools, evaluate results, and continue working until the task is completed or it needs assistance.</p><p>For example:</p><p>An AI coding agent might:</p><ol><li>Analyze a Java class.</li><li>Identify a potential bug.</li><li>Modify the implementation.</li><li>Run unit tests.</li><li>Review the test results.</li></ol><h3>AI Harness — The Supporting Environment</h3><p>The harness provides the infrastructure required to operate the agent.</p><p>It manages:</p><ul><li>Tool availability.</li><li>Context and instructions.</li><li>Execution permissions.</li><li>Interactions with external systems.</li><li>Error handling.</li><li>Validation.</li></ul><p>Think of it this way:</p><p>ComponentResponsibilityAI ModelThinks and generates responsesAI AgentDecides and performs tasksAI HarnessProvides and coordinates the execution environment</p><h3>3. How Does an AI Harness Work?</h3><p>Let’s take a practical example.</p><p>Imagine you are working on a Java Spring Boot microservices application.</p><p>You ask an AI coding assistant:</p><p>“Find why this API is returning HTTP 500 and fix the issue.”</p><p>A typical harness-supported workflow looks like this:</p><p><strong>Step 1: Receive the request</strong></p><p>The harness receives the user’s request and provides the relevant instructions and context to the AI model.</p><p><strong>Step 2: Analyze the application</strong></p><p>The agent uses available tools to inspect Java classes, service implementations, repositories, and application logs.</p><p><strong>Step 3: Identify the problem</strong></p><p>The AI model analyzes the available information and determines the likely cause.</p><p>For example, it might identify a missing null check in a service implementation.</p><p><strong>Step 4: Perform the action</strong></p><p>The agent uses file-editing tools to modify the Java implementation.</p><p><strong>Step 5: Execute tests</strong></p><p>The harness provides an execution environment where the agent can run Maven commands, such as:</p><p>mvn clean test</p><p><strong>Step 6: Validate the result</strong></p><p>The agent examines the test results and determines whether the changes solved the problem.</p><p>If tests fail, it can analyze the failure and attempt another correction.</p><p>This is where the harness becomes particularly important. It provides the mechanisms needed to move from an AI-generated suggestion to an actual, verifiable result.</p><h3>4. Basic Architecture of an AI Harness</h3><p>A simplified AI harness architecture consists of several components.</p><p><strong>1. AI Model</strong></p><p>The underlying LLM responsible for understanding and reasoning.</p><p><strong>2. Context Manager</strong></p><p>Provides relevant information such as conversation history, source code, and previous execution results.</p><p><strong>3. Tool Manager</strong></p><p>Connects the AI agent to external tools such as:</p><ul><li>GitHub</li><li>Databases</li><li>REST APIs</li><li>File systems</li><li>Command-line interfaces</li></ul><p><strong>4. Execution Engine</strong></p><p>Executes approved actions, such as running commands, modifying files, or executing tests.</p><p><strong>5. Memory</strong></p><p>Maintains relevant information across interactions, depending on the system’s memory design.</p><p><strong>6. Security and Guardrails</strong></p><p>Controls what the agent can access and which actions it is allowed to perform.</p><p><strong>7. Validation</strong></p><p>Checks whether the requested task was completed successfully.</p><p>Together, these components provide a controlled environment for AI-powered task execution.</p><h3>5. Why Is an AI Harness Important?</h3><p>Without a harness, an AI model is primarily limited to generating responses based on the information provided to it.</p><p>A harness makes it possible to build systems that can interact with real applications and perform useful work.</p><p>Some important benefits include:</p><p><strong>Automation</strong></p><p>AI agents can perform repetitive development activities, such as analyzing logs, reviewing code, and running tests.</p><p><strong>Tool Integration</strong></p><p>Agents can connect to external systems through APIs, databases, and other tools.</p><p><strong>Reliability</strong></p><p>Validation, error handling, and controlled execution help reduce the risk of incorrect actions.</p><p><strong>Security</strong></p><p>Permissions and guardrails help control access to sensitive resources.</p><p><strong>Extensibility</strong></p><p>Developers can introduce additional tools and capabilities without changing the underlying AI model.</p><h3>6. Is an AI Harness the Same as an AI Framework?</h3><p>Not exactly.</p><p>An AI framework typically provides reusable libraries and abstractions for building AI applications and agents.</p><p>An AI harness focuses on the environment and mechanisms used to operate the model or agent.</p><p>For example:</p><ul><li>LangChain provides components for building LLM-powered applications and agents.</li><li>LangGraph provides capabilities for orchestrating stateful agent workflows.</li><li>An AI coding harness can coordinate model interactions, repository access, terminal execution, and code validation.</li></ul><p>The terms can overlap. Some frameworks provide harness-like capabilities, and some agent environments are built using multiple frameworks and custom infrastructure.</p><h3>7. What Does This Mean for Java Developers?</h3><p>For Java developers, AI harness engineering opens up interesting opportunities.</p><p>Imagine building an AI-powered developer assistant using Spring Boot.</p><p>It could:</p><ol><li>Connect to GitHub repositories.</li><li>Read Java source files.</li><li>Analyze application logs.</li><li>Identify common exceptions.</li><li>Suggest code improvements.</li><li>Trigger Maven builds.</li><li>Analyze test failures.</li><li>Generate a code review report.</li></ol><p>A possible high-level architecture could look like this:</p><ul><li><strong>Spring Boot:</strong> Backend orchestration and application services.</li><li><strong>LLM:</strong> Reasoning and code analysis.</li><li><strong>MCP:</strong> Standardized integration with external tools.</li><li><strong>Tool execution layer:</strong> Repository, file, and command-line operations.</li><li><strong>Security layer:</strong> Access control and execution restrictions.</li><li><strong>Validation layer:</strong> Build and test verification.</li></ul><p>This is an example of how traditional backend engineering skills can be applied to AI engineering.</p><h3>Conclusion</h3><p>AI is moving from systems that simply answer questions to systems that can perform meaningful tasks.</p><p>An AI model provides intelligence. An AI agent uses that intelligence to accomplish goals. An AI harness provides the supporting infrastructure that connects the model to tools, context, execution, and validation.</p><p>Understanding AI harnesses is an important step toward understanding how modern AI agents and AI-powered developer tools are designed.</p><p><strong>The next evolution of software engineering is not just about integrating AI into applications. It is about engineering the environment in which AI can safely and reliably get work done.</strong></p><p>In the next article, we will explore <strong>AI Model vs AI Agent vs AI Harness: Understanding the Key Differences with Practical Examples.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5211703ab7b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Java Security Alert: CVE-2026–91403 — How to Assess Your JDK and Patch Production Kubernetes…]]></title>
            <link>https://medium.com/@dkamalkanth/java-security-alert-cve-2026-91403-how-to-assess-your-jdk-and-patch-production-kubernetes-d18c413c7aae?source=rss-5974ae0c7855------2</link>
            <guid isPermaLink="false">https://medium.com/p/d18c413c7aae</guid>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[KD]]></dc:creator>
            <pubDate>Sun, 25 Oct 2026 11:12:10 GMT</pubDate>
            <atom:updated>2026-10-25T11:12:10.539Z</atom:updated>
            <content:encoded><![CDATA[<h3>Java Security Alert: CVE-2026–91403 — How to Assess Your JDK and Patch Production Kubernetes Applications</h3><p>Java applications often depend on TLS to communicate securely with APIs, databases, identity providers, and external services. But keeping an application secure requires more than enabling HTTPS or upgrading a Maven dependency. The Java runtime itself must also be monitored and patched.</p><p>On October 21, 2026, Oracle published a Security Alert for <strong>CVE-2026–91403</strong>, a vulnerability affecting Java’s Java Secure Socket Extension (JSSE) component. Oracle rates it <strong>CVSS 3.1: 9.1 (Critical)</strong> and provides Java updates that distrust the impacted eMudhra intermediate certificate authorities.</p><p>For engineering teams running Java in production, this is a reminder that runtime security is part of application security — not just an infrastructure responsibility.</p><p>In this article, we’ll examine the advisory, identify what Java teams should check, and walk through a practical remediation workflow for Spring Boot applications running in Docker and Kubernetes.</p><h3>1. What is CVE-2026–91403?</h3><p>Oracle’s security advisory identifies the affected component as JSSE, the Java platform’s security and networking APIs used for TLS and related protocols.</p><p>The advisory addresses the vulnerability by updating Java to distrust a set of impacted intermediate CA certificates associated with eMudhra.</p><p>Why does that matter?</p><p>TLS certificate validation helps applications establish trust in the identity presented by a remote server. Java applications may use this functionality when communicating with external services, internal APIs, and other systems over secure connections.</p><p>If a certificate authority is no longer trusted, the runtime’s trust decisions must reflect that change. Applications should not continue trusting certificates that the security update intends to distrust.</p><p>Oracle’s advisory lists a CVSS score of 9.1 and identifies the issue as remotely exploitable without authentication under the conditions described in its risk matrix.</p><p><strong>The important takeaway:</strong> Do not assess this issue only by checking whether your application uses HTTPS. Determine which Java runtime it uses, whether that runtime is in scope, and whether the appropriate security update or mitigation has been applied.</p><p>Official advisory: <a href="https://www.oracle.com/security-alerts/alert-cve-2026-91403.html">https://www.oracle.com/security-alerts/alert-cve-2026-91403.html</a></p><h3>2. Which Java versions should you check?</h3><p>Oracle’s advisory lists the following affected releases for CVE-2026–91403:</p><p>Java releaseVersion listed in the advisoryJava 88u511 and 8u511-perfJava 1111.0.33Java 1717.0.21Java 2121.0.13Java 2525.0.5Java 2727.0.1</p><p>The advisory also lists affected GraalVM distributions, including GraalVM for JDK 17.0.21 and 21.0.13, and GraalVM Enterprise Edition 21.3.20.</p><p>These are the versions identified in the advisory’s affected-product information; do not interpret the table as a list of recommended upgrade targets.</p><p>Oracle directs customers to the applicable patch-availability documentation for installation guidance. Check that documentation to determine the appropriate fixed release or mitigation for your specific distribution.</p><p>Source: <a href="https://www.oracle.com/security-alerts/alert-cve-2026-91403.html">https://www.oracle.com/security-alerts/alert-cve-2026-91403.html</a></p><h3>What if you are running Java 21.0.12?</h3><p>This is an important distinction.</p><p>Java 21.0.12 is not the same version as Java 21.0.13, which appears in Oracle’s affected-product table. However, the table alone is not sufficient to establish the complete exposure status of every vendor’s Java 21.0.12 build.</p><p>For your environment:</p><ol><li>Identify the JDK vendor and exact build.</li><li>Check the vendor’s security advisory and supported patch guidance.</li><li>Determine whether the runtime contains the relevant certificate distrust update or requires a separate mitigation.</li><li>Select a supported, appropriately patched release.</li></ol><p>Do not assume that all distributions of Java 21 have identical security fixes or release schedules.</p><h3>3. Step one: Identify the Java runtime</h3><p>Start by identifying the Java version used by your application.</p><p>Run:</p><pre>java -version</pre><p>Example output might look like:</p><pre>openjdk version &quot;21.0.12&quot; 2026-07-15<br>OpenJDK Runtime Environment ...<br>OpenJDK 64-Bit Server VM ...</pre><p>This example is illustrative, not an indication of a particular vendor’s build.</p><p>Next, identify which Java executable your shell is using.</p><p>On Linux:</p><pre>which java<br>readlink -f &quot;$(which java)&quot;</pre><p>Check the runtime properties:</p><pre>java -XshowSettings:properties -version</pre><p>Look for properties such as java.vendor, java.runtime.version, and java.home.</p><p>Why is this important?</p><p>A developer workstation may use one JDK, the build pipeline another, and the production container a third. Checking the local workstation alone does not establish which runtime is deployed.</p><p><strong>Best practice:</strong> Record the vendor, complete runtime version, operating system, architecture, and deployment image for each production Java service.</p><h3>4. Step two: Check Spring Boot and Maven dependencies</h3><p>Java runtime vulnerabilities are not necessarily fixed by changing a Maven dependency.</p><p>For a Spring Boot application, inspect your project configuration:</p><pre>mvn dependency:tree</pre><p>You can also inspect the effective POM:</p><pre>mvn help:effective-pom</pre><p>These commands help identify application dependencies and inherited build configuration. They do not, by themselves, prove which JDK is used to run the application.</p><p>Review the following separately:</p><ul><li>The JDK used by the Maven build.</li><li>The JDK used by test execution.</li><li>The JDK packaged into the production container.</li><li>Any separately configured runtime or truststore.</li><li>The base image and its security-update history.</li></ul><p>If your application uses a custom truststore, do not assume that a runtime update automatically changes every truststore your application loads. Confirm the actual configuration and follow the vendor’s remediation guidance.</p><h3>5. Step three: Update the Java runtime</h3><p>Once you have confirmed the vendor and affected runtime, obtain the appropriate supported security update.</p><p>For Oracle Java, start with the official advisory and follow its patch-availability instructions:</p><p><a href="https://www.oracle.com/security-alerts/alert-cve-2026-91403.html">https://www.oracle.com/security-alerts/alert-cve-2026-91403.html</a></p><p>For other distributions, use the corresponding vendor’s security guidance.</p><p>A safe upgrade workflow is:</p><ol><li>Select the appropriate patched runtime for your Java feature release.</li><li>Update the JDK installation or container base image.</li><li>Rebuild the application artifact or runtime image as appropriate.</li><li>Run automated tests and security checks.</li><li>Deploy through your normal release process.</li><li>Verify the running runtime and certificate-validation behavior.</li><li>Retain a rollback plan that does not reintroduce the vulnerable runtime.</li></ol><p>Avoid choosing a Java version solely because its version number is larger. Confirm the security fix, support status, and compatibility with your application.</p><h3>6. Step four: Patch Java in Docker</h3><p>Many Spring Boot microservices run inside containers. Updating Java on a developer workstation or Kubernetes node does not necessarily update the JDK inside the application image.</p><p>Consider a Dockerfile such as:</p><pre>FROM eclipse-temurin:21-jre</pre><pre>WORKDIR /app</pre><pre>COPY target/application.jar app.jar</pre><pre>ENTRYPOINT [&quot;java&quot;, &quot;-jar&quot;, &quot;app.jar&quot;]</pre><p>This is an illustrative example, not a recommendation that this particular tag contains the required CVE fix.</p><p>The remediation process should be:</p><ul><li>Identify the exact base image and digest currently deployed.</li><li>Check the image publisher’s security guidance.</li><li>Select an appropriately patched, supported image.</li><li>Update the Dockerfile or centrally managed base-image reference.</li><li>Rebuild and scan the resulting image.</li><li>Test the application and its TLS integrations.</li><li>Publish and deploy the new immutable image.</li></ul><p>For repeatable production builds, pin images by digest where appropriate and maintain a process for regularly updating those digests.</p><p>Do not assume that rebuilding with an unchanged image tag will necessarily pull a new image. Build caches and mutable tags can make the actual runtime less obvious than the Dockerfile suggests.</p><h3>7. Step five: Verify the Java version inside Kubernetes</h3><p>After rebuilding the image, deploy it through your normal rollout process.</p><p>First, list the pods:</p><pre>kubectl get pods -n your-namespace</pre><p>Inspect the image configured for a deployment:</p><pre>kubectl get deployment your-deployment \<br>  -n your-namespace \<br>  -o jsonpath=&#39;{.spec.template.spec.containers[*].image}&#39;</pre><p>Check the Java runtime inside a running pod:</p><pre>kubectl exec -n your-namespace your-pod -- java -version</pre><p>The last command assumes the container includes a Java executable accessible through its PATH. Minimal or distroless images may require a different verification approach.</p><p>Check the rollout:</p><pre>kubectl rollout status deployment/your-deployment \<br>  -n your-namespace</pre><p>These checks provide useful deployment evidence, but they are not sufficient on their own. Also verify the deployed image digest, the intended runtime build, and the relevant certificate-validation behavior.</p><h3>What about multiple replicas?</h3><p>In a rolling deployment, some replicas may temporarily run the old image while others run the new one.</p><p>Verify that:</p><ul><li>The rollout completed successfully.</li><li>The expected number of replicas is available.</li><li>No old ReplicaSet or independently managed workload is still serving traffic unexpectedly.</li><li>Background workers, scheduled jobs, and other Java workloads have also been assessed.</li><li>The rollback configuration will not unintentionally restore a vulnerable image.</li></ul><p>Do not stop at checking one pod. The goal is to establish that the production workload has actually moved to the intended runtime.</p><h3>8. Step six: Test certificate validation and application behavior</h3><p>A runtime upgrade is not complete simply because the application starts.</p><p>For a certificate-trust-related security update, regression testing should include the application’s relevant TLS integrations.</p><p>Consider testing:</p><ul><li>Outbound HTTPS calls to external APIs.</li><li>Internal service-to-service TLS communication.</li><li>Authentication and identity-provider endpoints.</li><li>Any custom truststores or certificate-pinning configuration.</li><li>Health checks and background jobs that make TLS connections.</li></ul><p>Where appropriate, validate expected certificate-chain behavior using a controlled test environment and the vendor’s documented guidance.</p><p>Do not weaken TLS verification or add a certificate to a truststore merely to suppress a connection error. A failed certificate validation may indicate that the update is working as intended or that the environment requires a legitimate certificate replacement.</p><p>Investigate the root cause before changing trust configuration.</p><h3>9. Common mistakes to avoid</h3><h3>Mistake 1: Checking only the local Java version</h3><p>The deployed application may use a completely different runtime.</p><p><strong>Better approach:</strong> Verify the runtime in the build, image, and deployed workload.</p><h3>Mistake 2: Updating Maven dependencies instead of the JDK</h3><p>A runtime vulnerability may not be addressed by updating a library in pom.xml.</p><p><strong>Better approach:</strong> Identify whether the vulnerability is in the JDK, an application dependency, or both.</p><h3>Mistake 3: Rebuilding without updating the base image</h3><p>A fresh build can still contain the old runtime.</p><p><strong>Better approach:</strong> Confirm the image reference and digest, then verify the resulting image.</p><h3>Mistake 4: Assuming every Java vendor ships the same patch on the same date</h3><p>Different distributions may have different release schedules, support policies, and backports.</p><p><strong>Better approach:</strong> Use the advisory for your actual JDK vendor.</p><h3>Mistake 5: Treating a successful deployment as proof of remediation</h3><p>A healthy pod does not prove that the required security change is present.</p><p><strong>Better approach:</strong> Verify the runtime, image provenance, relevant fix, and application behavior.</p><h3>10. Build a repeatable Java security patch process</h3><p>For enterprise Java environments, security remediation should be an operational process rather than a one-time reaction to a CVE.</p><p>A practical workflow looks like this:</p><p><strong>Monitor → Inventory → Assess → Patch → Test → Deploy → Verify → Record</strong></p><p>Maintain an inventory of Java runtimes and base images. Monitor Oracle and other vendor advisories. Assess exposure based on the actual runtime and application usage. Apply the appropriate update, test it, deploy it, and retain evidence of the result.</p><p>For teams operating multiple Spring Boot microservices, automate as much of this process as possible:</p><ul><li>Centralize approved base-image versions.</li><li>Scan container images in CI/CD.</li><li>Track runtime versions across environments.</li><li>Set remediation deadlines based on severity and exposure.</li><li>Alert on unsupported or outdated runtimes.</li><li>Verify that production deployments use approved image digests.</li></ul><p>A software architect should make runtime patching part of the platform’s standard operating model — not leave it to individual application developers to discover and resolve each issue independently.</p><h3>Conclusion</h3><p>CVE-2026–91403 is a useful reminder that Java security includes the runtime’s certificate-trust behavior, not just application code and third-party libraries.</p><p>For teams running Spring Boot services on Java 21 or other supported releases, the practical response is straightforward: identify the exact runtime, consult the correct vendor advisory, apply the appropriate fix or mitigation, rebuild and deploy the application image, and verify the production result.</p><p>The most important lesson is this:</p><p><strong>A secure Java application is not simply an application with secure code. It is an application running on a supported, appropriately patched, and verifiably deployed runtime.</strong></p><h3>Official references</h3><ol><li>Oracle Security Alert — CVE-2026–91403: <a href="https://www.oracle.com/security-alerts/alert-cve-2026-91403.html">https://www.oracle.com/security-alerts/alert-cve-2026-91403.html</a></li><li>Oracle Security Blog — Security Alert Released: <a href="https://blogs.oracle.com/security/security-alert-cve-2026-91403-released">https://blogs.oracle.com/security/security-alert-cve-2026-91403-released</a></li><li>National Vulnerability Database — CVE-2026–91403: <a href="https://nvd.nist.gov/vuln/detail/CVE-2026-91403">https://nvd.nist.gov/vuln/detail/CVE-2026-91403</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d18c413c7aae" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Structured Concurrency in Java 27: When and Why Should You Use It?]]></title>
            <link>https://medium.com/@dkamalkanth/structured-concurrency-in-java-27-when-and-why-should-you-use-it-5c9e57cd33b1?source=rss-5974ae0c7855------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c9e57cd33b1</guid>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[java27]]></category>
            <dc:creator><![CDATA[KD]]></dc:creator>
            <pubDate>Mon, 21 Sep 2026 11:58:12 GMT</pubDate>
            <atom:updated>2026-09-21T11:58:12.521Z</atom:updated>
            <content:encoded><![CDATA[<p>Java has changed dramatically when it comes to concurrency.</p><p>For many years, Java developers relied on:</p><ul><li>ExecutorService</li><li>Thread pools</li><li>Future</li><li>CompletableFuture</li><li>@Async</li></ul><p>Then Java 21 introduced <strong>Virtual Threads</strong>, making it much easier to handle large numbers of concurrent tasks.</p><p>Now, <strong>Structured Concurrency</strong> provides another important piece of the puzzle: a better way to <strong>organize, manage, and control concurrent tasks</strong>.</p><p>This raises an obvious question:</p><blockquote><em>If I already have Virtual Threads and CompletableFuture, why do I need Structured Concurrency?</em></blockquote><p>The answer is simple:</p><p><strong>Virtual Threads and Structured Concurrency solve different problems.</strong></p><ul><li><strong>Virtual Threads</strong> make concurrent execution lightweight.</li><li><strong>Structured Concurrency</strong> gives concurrent tasks a clear lifecycle and relationship.</li><li><strong>CompletableFuture</strong> provides asynchronous composition and is still useful, especially when integrating with existing asynchronous APIs.</li></ul><p>Let’s look at when to use each one.</p><h3>1. The Traditional Approach: CompletableFuture</h3><p>Suppose our Spring Boot application needs to build a customer dashboard.</p><p>We need three independent services:</p><pre>Customer Dashboard<br>                        |<br>          +-------------+-------------+<br>          |             |             |<br>          ↓             ↓             ↓<br>      Customer       Orders        Payments<br>       Service       Service        Service</pre><p>The calls can happen concurrently.</p><p>A common implementation is:</p><pre>CompletableFuture&lt;Customer&gt; customer =<br>        CompletableFuture.supplyAsync(<br>                () -&gt; customerService.getCustomer(customerId));</pre><pre>CompletableFuture&lt;List&lt;Order&gt;&gt; orders =<br>        CompletableFuture.supplyAsync(<br>                () -&gt; orderService.getOrders(customerId));</pre><pre>CompletableFuture&lt;Payment&gt; payment =<br>        CompletableFuture.supplyAsync(<br>                () -&gt; paymentService.getPayment(customerId));</pre><pre>CompletableFuture.allOf(customer, orders, payment).join();</pre><pre>return new CustomerDashboard(<br>        customer.join(),<br>        orders.join(),<br>        payment.join()<br>);</pre><p>This works.</p><p>But there are some things we need to manage ourselves:</p><ul><li>How are tasks cancelled?</li><li>What happens when one task fails?</li><li>What happens to the other tasks?</li><li>Which executor is being used?</li><li>How do we propagate exceptions?</li><li>Who owns the lifecycle of these asynchronous tasks?</li></ul><p>As the number of operations increases, the code can become harder to reason about.</p><h3>2. Virtual Threads Changed the Game</h3><p>Java 21 introduced Virtual Threads.</p><p>A virtual thread is a lightweight thread managed by the JVM rather than being directly tied to an operating-system thread for its entire lifetime.</p><p>Instead of creating a large platform-thread pool:</p><pre>ExecutorService executor =<br>        Executors.newFixedThreadPool(100);</pre><p>we can use:</p><pre>ExecutorService executor =<br>        Executors.newVirtualThreadPerTaskExecutor();</pre><p>Then:</p><pre>Future&lt;Customer&gt; customer =<br>        executor.submit(<br>                () -&gt; customerService.getCustomer(customerId));</pre><pre>Future&lt;List&lt;Order&gt;&gt; orders =<br>        executor.submit(<br>                () -&gt; orderService.getOrders(customerId));</pre><pre>Future&lt;Payment&gt; payment =<br>        executor.submit(<br>                () -&gt; paymentService.getPayment(customerId));</pre><p>Virtual Threads are particularly useful for <strong>I/O-bound workloads</strong>.</p><p>For example:</p><pre>Virtual Thread<br>      |<br>      +---- HTTP call<br>      |<br>      +---- waits<br>      |<br>      +---- database call<br>      |<br>      +---- waits<br>      |<br>      +---- returns</pre><p>While the virtual thread is waiting for I/O, the underlying platform thread can be used for other work.</p><p>This makes Virtual Threads very attractive for:</p><ul><li>REST calls</li><li>Database operations</li><li>Messaging</li><li>File I/O</li><li>Other blocking I/O operations</li></ul><p>But Virtual Threads don’t solve the <strong>task lifecycle problem</strong>.</p><p>That’s where Structured Concurrency comes in.</p><h3>3. What Is Structured Concurrency?</h3><p>Structured Concurrency treats a group of concurrent tasks as a single unit of work.</p><p>The basic idea is:</p><blockquote><em>If a task is started inside a scope, its lifetime should be bounded by that scope.</em></blockquote><p>For example:</p><pre>try (var scope = StructuredTaskScope.open(<br>        StructuredTaskScope.Joiner.allSuccessfulOrThrow())) {</pre><pre>    var customer = scope.fork(<br>            () -&gt; customerService.getCustomer(customerId));</pre><pre>    var orders = scope.fork(<br>            () -&gt; orderService.getOrders(customerId));</pre><pre>    var payment = scope.fork(<br>            () -&gt; paymentService.getPayment(customerId));</pre><pre>    scope.join();</pre><pre>    return new CustomerDashboard(<br>            customer.get(),<br>            orders.get(),<br>            payment.get()<br>    );<br>}</pre><p>This code expresses the business relationship much more clearly.</p><p>We are saying:</p><blockquote><em>“To create the dashboard, I need these three pieces of information. Get them concurrently, and consider them part of this single operation.”</em></blockquote><h3>4. The Parent-Child Relationship</h3><p>This is one of the most important concepts in Structured Concurrency.</p><p>Think about it like this:</p><pre>Dashboard Request<br>                     |<br>              Structured Scope<br>             /        |        \<br>            /         |         \<br>     Customer       Orders     Payment<br>       Task           Task        Task</pre><p>The parent operation owns the child tasks.</p><p>If the parent scope finishes, the child tasks shouldn’t continue running independently.</p><p>If the parent operation fails, the scope can coordinate cancellation of the related tasks.</p><p>This is fundamentally different from simply submitting tasks to an executor and hoping that we manage their lifecycle correctly.</p><h3>5. What Happens If One Task Fails?</h3><p>Consider:</p><pre>Customer API       → SUCCESS<br>Orders API         → FAILURE<br>Payment API        → still running</pre><p>With an unstructured asynchronous implementation, we need to explicitly think about what happens to the Payment task.</p><p>Structured Concurrency gives us a scope that understands that these tasks belong together.</p><p>Using:</p><pre>StructuredTaskScope.Joiner.allSuccessfulOrThrow()</pre><p>we are expressing:</p><blockquote><em>All tasks must succeed for this operation to succeed.</em></blockquote><p>If one fails, the overall operation fails and the other subtasks can be cancelled according to the scope’s policy.</p><p>This is one of the major advantages of Structured Concurrency.</p><h3>6. Structured Concurrency + Virtual Threads</h3><p>This is where the two features complement each other.</p><p>Think of them as two different layers:</p><pre>Structured Concurrency<br>        -----------------------<br>        Task lifecycle<br>        Error propagation<br>        Cancellation<br>        Parent/child relationship<br>                 |<br>                 ↓<br>             Virtual Threads<br>        -----------------------<br>        Lightweight execution<br>        Large number of concurrent tasks</pre><p>Structured Concurrency doesn’t replace Virtual Threads.</p><p>They can work together.</p><p>For example:</p><pre>try (var scope = StructuredTaskScope.open(<br>        StructuredTaskScope.Joiner.allSuccessfulOrThrow())) {</pre><pre>    var customer = scope.fork(<br>            () -&gt; customerService.getCustomer(customerId));</pre><pre>    var orders = scope.fork(<br>            () -&gt; orderService.getOrders(customerId));</pre><pre>    var payment = scope.fork(<br>            () -&gt; paymentService.getPayment(customerId));</pre><pre>    scope.join();</pre><pre>    return new CustomerDashboard(<br>            customer.get(),<br>            orders.get(),<br>            payment.get()<br>    );<br>}</pre><p>The Structured Concurrency API provides the structure, while the JDK’s concurrency model uses lightweight threads for the subtasks.</p><h3>7. When Should I Use CompletableFuture?</h3><p>This is where developers often assume that Structured Concurrency means:</p><blockquote><em>“CompletableFuture is dead.”</em></blockquote><p>That’s not correct.</p><p>CompletableFuture is still useful.</p><p>For example, if you’re consuming an API that already returns:</p><pre>CompletionStage&lt;Customer&gt;</pre><p>then CompletableFuture is a natural fit.</p><p>It is also useful when you need explicit asynchronous pipeline composition:</p><pre>CompletableFuture<br>    .supplyAsync(this::loadCustomer)<br>    .thenApply(this::validateCustomer)<br>    .thenCompose(this::loadOrders)<br>    .exceptionally(this::handleError);</pre><p>This represents an asynchronous pipeline.</p><p>Structured Concurrency is more about the <strong>lifecycle of related concurrent operations</strong>.</p><h3>8. CompletableFuture vs Structured Concurrency</h3><p>Consider this comparison.</p><h3>CompletableFuture</h3><pre>CompletableFuture&lt;User&gt; user =<br>        CompletableFuture.supplyAsync(<br>                () -&gt; getUser(id));</pre><pre>CompletableFuture&lt;List&lt;Order&gt;&gt; orders =<br>        CompletableFuture.supplyAsync(<br>                () -&gt; getOrders(id));</pre><pre>CompletableFuture.allOf(user, orders).join();</pre><p>The developer is explicitly coordinating the asynchronous operations.</p><h3>Structured Concurrency</h3><pre>try (var scope = StructuredTaskScope.open(<br>        StructuredTaskScope.Joiner.allSuccessfulOrThrow())) {</pre><pre>    var user = scope.fork(() -&gt; getUser(id));</pre><pre>    var orders = scope.fork(() -&gt; getOrders(id));</pre><pre>    scope.join();</pre><pre>    return new Dashboard(<br>            user.get(),<br>            orders.get()<br>    );<br>}</pre><p>The relationship between the operations is much more explicit.</p><h3>9. A Practical Decision Guide</h3><p>Here’s how I think about these technologies.</p><p>RequirementTechnology to considerLarge number of blocking I/O tasksVirtual ThreadsMultiple related operations running concurrentlyStructured ConcurrencyExisting API returns CompletableFutureCompletableFutureComplex async pipelineCompletableFutureNeed parent/child task lifecycleStructured ConcurrencyNeed coordinated cancellationStructured ConcurrencySimple synchronous blocking operationVirtual Thread can be enoughSpring MVC application with blocking I/OVirtual ThreadsMultiple downstream REST calls for one requestStructured Concurrency + Virtual ThreadsExisting reactive/WebFlux architectureReactive APIs may still be appropriate</p><p>The important thing is that these aren’t necessarily mutually exclusive.</p><h3>10. What About Spring Batch?</h3><p>Structured Concurrency should not be viewed as a replacement for Spring Batch’s concurrency mechanisms.</p><p>Spring Batch provides concepts such as:</p><ul><li>Chunk processing</li><li>Partitioning</li><li>Transactions</li><li>Retry</li><li>Skip</li><li>Restartability</li><li>Job/Step execution</li></ul><p>Those are batch concerns.</p><p>Virtual Threads can potentially be useful for I/O-heavy Batch processing.</p><p>For example:</p><pre>Spring Batch<br>                      |<br>                 Partitioning<br>                      |<br>              Virtual Threads<br>             /        |        \<br>            ↓         ↓         ↓<br>           DB        REST       DB</pre><p>But we shouldn’t blindly create thousands of concurrent database operations simply because Virtual Threads are cheap.</p><p>For example:</p><pre>10,000 Virtual Threads<br>          ↓<br>     DB Connection Pool<br>          ↓<br>       50 connections<br>          ↓<br>      Database</pre><p>The bottleneck may simply move from the thread pool to:</p><ul><li>Database connections</li><li>Database CPU</li><li>Connection pool</li><li>API rate limits</li><li>Downstream services</li><li>Locks</li><li>Memory</li></ul><p>Virtual Threads make concurrency cheaper.</p><p>They don’t make external resources unlimited.</p><h3>11. Don’t Use Structured Concurrency Everywhere</h3><p>Structured Concurrency is especially useful when tasks are <strong>related to one parent operation</strong>.</p><p>For example:</p><pre>HTTP Request<br>     |<br>     +---- Customer<br>     +---- Orders<br>     +---- Payments</pre><p>That’s a strong candidate.</p><p>But if you have a background operation that intentionally continues after the request finishes, that’s a different lifecycle.</p><p>For example:</p><pre>HTTP Request<br>     |<br>     +---- Send response<br>     |<br>     +---- Fire-and-forget background processing</pre><p>That isn’t naturally structured under the HTTP request because the background work intentionally has a different lifetime.</p><p>In those situations, other mechanisms may be more appropriate.</p><h3>Conclusion</h3><p>Java concurrency is no longer simply about choosing between threads and asynchronous programming.</p><p>We now have several complementary tools.</p><p><strong>Use Virtual Threads when you need efficient concurrency</strong>, especially for blocking I/O.</p><p><strong>Use Structured Concurrency when multiple concurrent operations belong to one parent operation and should share a lifecycle.</strong></p><p><strong>Use CompletableFuture when you need asynchronous stage composition or you’re integrating with APIs that already use </strong><strong>CompletionStage/</strong><strong>CompletableFuture.</strong></p><p>For a modern Spring Boot microservice, a useful architecture can therefore be:</p><pre>Spring Boot<br>                   |<br>            HTTP Request<br>                   |<br>        Structured Concurrency<br>          /        |        \<br>         /         |         \<br>     Service     Service    Service<br>       Call        Call       Call<br>         \          |         /<br>          \         |        /<br>             Virtual Threads</pre><p>The key isn’t to replace one concurrency technology with another.</p><p>It’s to choose the abstraction that matches the problem.</p><p><strong>Virtual Threads answer: “How can I run lots of concurrent work efficiently?”</strong></p><p><strong>Structured Concurrency answers: “How should related concurrent work live and fail together?”</strong></p><p><strong>CompletableFuture answers: “How can I compose asynchronous stages?”</strong></p><p>That distinction makes it much easier to decide what to use in Java 27.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c9e57cd33b1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Java 27: The Features That Actually Matter for Enterprise Developers]]></title>
            <link>https://medium.com/@dkamalkanth/java-27-the-features-that-actually-matter-for-enterprise-developers-f24b38cdd57e?source=rss-5974ae0c7855------2</link>
            <guid isPermaLink="false">https://medium.com/p/f24b38cdd57e</guid>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[java27]]></category>
            <dc:creator><![CDATA[KD]]></dc:creator>
            <pubDate>Tue, 15 Sep 2026 15:54:54 GMT</pubDate>
            <atom:updated>2026-09-15T15:54:54.573Z</atom:updated>
            <content:encoded><![CDATA[<p>Java 27: The Features That Actually Matter for Enterprise Developers</p><h3>A practical deep dive into G1 GC, compact object headers, structured concurrency, post-quantum TLS, lazy constants, pattern matching, JFR, and the future of modern Java</h3><p>Java has changed dramatically over the last few years.</p><p>The language that many developers remember as verbose and heavily object-oriented is becoming a much more expressive, concurrent, secure, and performance-oriented platform.</p><p>On September 15, 2026, Java 27 arrives as the latest feature release in Java’s six-month release cadence.</p><p>But Java 27 is not an LTS release. Java 25 is the current LTS release, while Java 27 is a feature release.</p><p>So the important question isn’t:</p><blockquote><strong><em>“Should every production application immediately move to Java 27?”</em></strong></blockquote><p>The better question is:</p><blockquote><strong><em>“What does Java 27 tell us about the direction of modern Java, and which features should enterprise developers start learning today?”</em></strong></blockquote><p>In this article, we’ll look at Java 27 from an enterprise architecture perspective.</p><h3>Java 27 at a Glance</h3><p>Java 27 contains nine JEPs:</p><p>JEPFeatureStatus523Make G1 the Default Garbage Collector in All EnvironmentsFinal527Post-Quantum Hybrid Key Exchange for TLS 1.3Final531Lazy ConstantsThird Preview532Primitive Types in Patterns, instanceof, and switchFifth Preview533Structured ConcurrencySeventh Preview534Compact Object Headers by DefaultFinal536JFR In-Process Data RedactionFinal537Vector APITwelfth Incubator538PEM Encodings of Cryptographic ObjectsThird Preview</p><p>These features span the Java language, core libraries, HotSpot, performance, security, and observability.</p><p>What I find particularly interesting is that several of the most important changes don’t require application developers to rewrite their code.</p><p>That’s a very different type of Java evolution.</p><h3>1. Java 27 Is More About the JVM Than Syntax</h3><p>When developers hear about a new Java release, the first thing they often look for is new syntax.</p><p>Java 27 is different.</p><p>Some of the most significant improvements are happening underneath the application:</p><pre>Java Application<br>                       │<br>             ┌─────────┴─────────┐<br>             │                   │<br>        Java Language         Libraries<br>             │                   │<br>             └─────────┬─────────┘<br>                       │<br>                     JVM<br>                       │<br>        ┌──────────────┼──────────────┐<br>        │              │              │<br>       GC          Object Layout     JFR<br>        │              │              │<br>       G1        Compact Headers   Security<br>                       │<br>                    Hardware</pre><p>For enterprise applications, this matters.</p><p>A JVM improvement that reduces memory overhead or improves garbage-collection behavior can benefit thousands of services without changing a single line of business logic.</p><p>That is one of the themes of Java 27.</p><h3>2. JEP 523 — G1 Becomes the Default Garbage Collector</h3><p>One of the most important Java 27 changes is <strong>JEP 523: Make G1 the Default Garbage Collector in All Environments</strong>.</p><p>G1 has been the default collector for many Java environments for years, but Java 27 expands that default so that G1 is selected across environments where the JVM previously might have selected another collector based on machine constraints.</p><p>The goal is consistency.</p><p>Instead of having the default GC selection depend on the environment, Java 27 makes G1 the default choice.</p><p>Why does this matter?</p><p>Consider a microservices deployment:</p><pre>Kubernetes Cluster<br>       │<br>       ├── Customer Service<br>       ├── Payment Service<br>       ├── Loan Service<br>       ├── Notification Service<br>       └── Reporting Service</pre><p>Some services may run with:</p><pre>256 MB<br>512 MB<br>1 GB<br>2 GB<br>4 GB</pre><p>Historically, JVM defaults could vary depending on the environment.</p><p>Java 27 makes the default behavior more predictable.</p><p>However, there is an important architectural lesson:</p><blockquote><strong><em>Never assume the default garbage collector is automatically the best garbage collector for every workload.</em></strong></blockquote><p>Always benchmark representative workloads.</p><p>For example:</p><pre>java -Xlog:gc* -jar application.jar</pre><p>Measure:</p><ul><li>Allocation rate</li><li>GC frequency</li><li>Pause times</li><li>Heap utilization</li><li>CPU consumption</li><li>Throughput</li></ul><p>Then compare the results with your production workload.</p><p>The important improvement in Java 27 is not simply “G1 is better.”</p><p>It’s <strong>more predictable JVM behavior across environments</strong>.</p><h3>3. JEP 534 — Compact Object Headers by Default</h3><p>This is one of the Java 27 features I would pay close attention to as a backend architect.</p><p>Every Java object carries JVM metadata.</p><p>Historically, object headers have consumed a non-trivial amount of memory, especially in applications creating large numbers of small objects.</p><p>Java 27 makes <strong>Compact Object Headers</strong> the default.</p><p>The feature builds on work that reduces the amount of metadata required in an object’s header.</p><p>This can improve memory efficiency because Java applications frequently create enormous numbers of objects.</p><p>Think about a typical enterprise application:</p><pre>Request<br>  ↓<br>DTO<br>  ↓<br>Entity<br>  ↓<br>Collection<br>  ↓<br>String<br>  ↓<br>JSON objects<br>  ↓<br>Temporary objects</pre><p>A single request can generate thousands of objects.</p><p>Now multiply that by:</p><pre>10,000 requests/second</pre><p>Object layout becomes important.</p><p>Compact object headers can therefore have a meaningful impact on memory footprint and potentially application throughput.</p><p>But there is another lesson here.</p><p>If your application uses:</p><ul><li>JVM agents</li><li>profiling tools</li><li>bytecode instrumentation</li><li>native integrations</li><li>low-level JVM tooling</li></ul><p>you should test them carefully when moving to Java 27.</p><p>This is a runtime-level change, so compatibility testing matters.</p><h3>4. Java 27 and Microservices: Smaller Objects Matter</h3><p>This becomes particularly interesting in microservice environments.</p><p>Suppose you have:</p><pre>100 Kubernetes Pods</pre><p>and each service consumes slightly less memory.</p><p>The impact isn’t limited to one JVM.</p><p>It can affect:</p><pre>Memory<br> ↓<br>Container sizing<br> ↓<br>Node utilization<br> ↓<br>Cluster capacity<br> ↓<br>Infrastructure cost</pre><p>This is why JVM-level improvements should be part of an architect’s Java roadmap.</p><p>A Java upgrade isn’t always about getting a new language feature.</p><p>Sometimes the biggest benefit is:</p><blockquote><strong><em>The same application doing the same work more efficiently.</em></strong></blockquote><h3>5. JEP 527 — Post-Quantum Hybrid Key Exchange for TLS 1.3</h3><p>Java 27 also takes an important step in cryptographic security.</p><p><strong>JEP 527 introduces post-quantum hybrid key exchange for TLS 1.3.</strong></p><p>Why does this matter?</p><p>Traditional public-key cryptography relies on mathematical problems that are difficult for classical computers to solve.</p><p>Large-scale quantum computers could potentially threaten some of those assumptions.</p><p>That creates a security concern commonly described as:</p><blockquote><strong><em>Harvest now, decrypt later.</em></strong></blockquote><p>An attacker could capture encrypted traffic today and attempt to decrypt it in the future when sufficiently capable quantum computers become available.</p><p>Java 27 introduces hybrid key exchange for TLS 1.3, combining traditional cryptographic mechanisms with post-quantum approaches.</p><p>For enterprise systems, this is particularly relevant to:</p><ul><li>Banking</li><li>Healthcare</li><li>Government</li><li>Financial services</li><li>Long-lived sensitive data</li><li>Internal APIs</li><li>Cloud-to-cloud communication</li></ul><p>Oracle describes JEP 527 as part of Java’s broader post-quantum cryptography strategy.</p><p>The interesting part is that this is a <strong>platform-level security improvement</strong>.</p><p>Application developers shouldn’t need to redesign every REST API simply because the cryptographic ecosystem is evolving.</p><p>That’s exactly where a mature platform like Java provides value.</p><h3>6. JEP 536 — Better Protection for Sensitive JFR Data</h3><p>Java Flight Recorder (JFR) is one of the most powerful tools available for diagnosing JVM behavior.</p><p>It can help analyze:</p><ul><li>CPU usage</li><li>Garbage collection</li><li>Threads</li><li>Locks</li><li>I/O</li><li>allocations</li><li>runtime behavior</li></ul><p>But diagnostic data can sometimes contain sensitive information.</p><p>Java 27 introduces <strong>JEP 536: JFR In-Process Data Redaction</strong>.</p><p>The goal is to reduce the risk of sensitive process information being exposed through JFR recordings.</p><p>This is particularly relevant in enterprise environments where diagnostic recordings may be:</p><pre>Application<br>    ↓<br>JFR<br>    ↓<br>Central monitoring<br>    ↓<br>Engineering team<br>    ↓<br>Support / Operations</pre><p>Observability is extremely valuable.</p><p>But observability data must also be treated as sensitive.</p><p>This is an increasingly important architectural principle:</p><blockquote><strong><em>You cannot separate observability from security.</em></strong></blockquote><p>Logs, traces, metrics, heap dumps, and JFR recordings can all become security-sensitive artifacts.</p><h3>7. JEP 533 — Structured Concurrency</h3><p>Now we get to a feature that developers will probably find especially interesting.</p><p><strong>Structured Concurrency</strong> continues its journey in Java 27 as the seventh preview.</p><p>This is part of Project Loom’s broader effort to make concurrent programming easier to reason about.</p><p>Consider a typical service request:</p><pre>Customer Request<br>       │<br>       ├── Customer Service<br>       │<br>       ├── Account Service<br>       │<br>       └── Recommendation Service</pre><p>These operations may be independent and therefore can potentially execute concurrently.</p><p>Traditional asynchronous code can quickly become complicated.</p><p>You might end up managing:</p><pre>Future<br>CompletableFuture<br>Executor<br>Cancellation<br>Timeout<br>Exception handling</pre><p>Structured concurrency aims to give these tasks a clear lifecycle.</p><p>Conceptually:</p><pre>Parent Task<br>    │<br>    ├── Child Task A<br>    ├── Child Task B<br>    └── Child Task C</pre><p>The parent owns the lifetime of the child tasks.</p><p>This provides a much cleaner mental model for:</p><ul><li>Cancellation</li><li>Error propagation</li><li>Task lifecycle</li><li>Timeouts</li><li>Observability</li></ul><p>Structured concurrency is still a preview feature in Java 27, so it should not be treated as a finalized production API yet.</p><h3>8. Structured Concurrency + Virtual Threads</h3><p>This is where modern Java becomes particularly interesting.</p><p>Virtual threads solve one part of the concurrency problem:</p><blockquote><strong><em>How can Java efficiently handle large numbers of concurrent tasks?</em></strong></blockquote><p>Structured concurrency addresses another:</p><blockquote><strong><em>How should those concurrent tasks be organized and managed?</em></strong></blockquote><p>Together, the architectural model looks like:</p><pre>Request<br>                       │<br>              Structured Scope<br>                 /     |     \<br>                /      |      \<br>          Task A     Task B    Task C<br>             │          │         │<br>        Virtual      Virtual   Virtual<br>        Thread       Thread    Thread</pre><p>This combination is particularly attractive for I/O-heavy microservices.</p><p>But again:</p><blockquote><strong><em>Concurrency does not automatically equal performance.</em></strong></blockquote><p>You still need to understand:</p><ul><li>Database connection pools</li><li>HTTP connection pools</li><li>Rate limits</li><li>Backpressure</li><li>Timeouts</li><li>External service capacity</li></ul><p>If your application creates 10,000 virtual threads but your database allows only 100 connections, the database is still the bottleneck.</p><p>Architecture wins over hype.</p><h3>9. JEP 531 — Lazy Constants</h3><p>Java 27 continues the evolution of <strong>Lazy Constants</strong>, now in its third preview.</p><p>The idea is simple:</p><blockquote><em>Create a value lazily, initialize it at most once, and then treat it as a stable constant.</em></blockquote><p>Conceptually:</p><pre>static final LazyConstant&lt;Service&gt; SERVICE =<br>        LazyConstant.of(Service::create);</pre><p>The value isn’t initialized immediately.</p><p>It is initialized when needed.</p><p>After initialization, the value doesn’t change.</p><p>This can be useful for expensive initialization such as:</p><ul><li>Configuration</li><li>Service clients</li><li>Parsers</li><li>Immutable lookup structures</li><li>Expensive resources</li></ul><p>The important distinction from ordinary lazy initialization is that the JVM can reason about the stability of the value.</p><p>That potentially enables additional runtime optimizations.</p><p>However, Lazy Constants remain a preview feature in Java 27.</p><h3>10. JEP 532 — Primitive Types in Patterns</h3><p>Java’s pattern matching story continues with <strong>JEP 532</strong>, another preview.</p><p>This feature extends pattern matching to primitive types.</p><p>Java has gradually moved from:</p><pre>if (obj instanceof String) {<br>    String value = (String) obj;<br>}</pre><p>toward more expressive pattern matching.</p><p>The next step is allowing primitive types to participate more naturally in patterns, instanceof, and switch.</p><p>This is part of a much larger Java language direction.</p><p>Java is increasingly trying to make code:</p><pre>Explicit<br>+<br>Type-safe<br>+<br>Readable<br>+<br>Less repetitive</pre><p>without turning Java into a completely different language.</p><h3>11. Pattern Matching Is Becoming a Core Java Skill</h3><p>Understand the evolution:</p><pre>Java 14+<br>     │<br>Pattern Matching for instanceof<br>     │<br>Java 17<br>     │<br>Sealed Classes<br>     │<br>Java 21<br>     │<br>Record Patterns<br>     │<br>Pattern Matching for switch<br>     │<br>Java 27<br>     │<br>Primitive Types in Patterns</pre><p>This tells you something important about Java’s design philosophy.</p><p>Java isn’t replacing its object-oriented model.</p><p>It is making that model more expressive.</p><h3>12. JEP 537 — Vector API</h3><p>The <strong>Vector API</strong> continues as an incubator feature in Java 27.</p><p>This is a lower-level feature and won’t be relevant to every Spring Boot developer.</p><p>But it is important for certain workloads.</p><p>Vector operations allow Java code to take advantage of CPU vector instructions for parallel computation.</p><p>Potential use cases include:</p><ul><li>Scientific computing</li><li>Machine learning workloads</li><li>Image processing</li><li>Encryption</li><li>Data processing</li><li>Numerical computation</li></ul><p>Conceptually:</p><pre>Scalar processing:</pre><pre>A → B → C → D<br></pre><pre>Vector processing:</pre><pre>A B C D<br>│ │ │ │<br>└─┴─┴─┴──&gt; CPU vector instruction</pre><p>The goal is to allow Java applications to express vector computations while letting the JVM map them efficiently to supported hardware instructions.</p><p>This is another example of Java moving closer to the hardware without requiring developers to abandon the JVM.</p><h3>13. JEP 538 — PEM Encodings of Cryptographic Objects</h3><p>Java 27 also continues work on PEM encoding APIs.</p><p>PEM is extremely common in the real world:</p><pre>-----BEGIN CERTIFICATE-----<br>...<br>-----END CERTIFICATE-----</pre><p>and:</p><pre>-----BEGIN PRIVATE KEY-----<br>...<br>-----END PRIVATE KEY-----</pre><p>Enterprise applications constantly interact with:</p><ul><li>TLS certificates</li><li>Private keys</li><li>Certificate chains</li><li>Kubernetes secrets</li><li>Cloud certificates</li><li>API gateways</li></ul><p>Making PEM handling more directly available through standard Java APIs reduces the need for custom parsing or third-party utilities.</p><p>This feature remains a preview in Java 27, so developers should follow its evolution before making it a core dependency of production designs.</p><h3>What Should Java Developers Learn from Java 27?</h3><p>If I were creating a Java 27 learning plan, I would prioritize the features differently.</p><h3>Must understand</h3><p><strong>1. G1 GC</strong></p><p>Understand:</p><ul><li>Heap</li><li>GC pauses</li><li>Allocation</li><li>Throughput</li><li>Container environments</li></ul><p><strong>2. Compact Object Headers</strong></p><p>Understand:</p><ul><li>Object layout</li><li>Memory overhead</li><li>JVM internals</li><li>Why object count matters</li></ul><p><strong>3. Post-Quantum TLS</strong></p><p>Understand:</p><ul><li>TLS 1.3</li><li>Key exchange</li><li>Cryptographic agility</li><li>PQC</li><li>Long-term data security</li></ul><p><strong>4. Structured Concurrency</strong></p><p>Understand:</p><ul><li>Task lifecycle</li><li>Cancellation</li><li>Failure propagation</li><li>Virtual threads</li><li>Timeouts</li></ul><h3>Learn and experiment</h3><p><strong>5. Lazy Constants</strong></p><p><strong>6. Primitive pattern matching</strong></p><p><strong>7. JFR data redaction</strong></p><p><strong>8. PEM APIs</strong></p><h3>Specialized</h3><p><strong>9. Vector API</strong></p><p>Study this deeply if you’re working on high-performance computing, numerical workloads, cryptography, or AI/ML infrastructure.</p><h3>My Take: What Actually Matters in Java 27?</h3><p>If I had to summarize Java 27 in five points:</p><h3>1. JVM improvements are becoming as important as language features.</h3><p>G1 and compact object headers are examples of improvements that can benefit applications without application rewrites.</p><h3>2. Security is becoming a platform concern.</h3><p>Post-quantum TLS shows that Java is preparing for threats that may not be visible in today’s application architecture.</p><h3>3. Concurrency is becoming easier to reason about.</h3><p>Virtual threads plus structured concurrency point toward a much cleaner concurrency model.</p><h3>4. Java continues to reduce unnecessary complexity.</h3><p>Pattern matching and lazy initialization are examples of Java becoming more expressive without abandoning its type system.</p><h3>5. Enterprise Java should remain pragmatic.</h3><p>Not every preview feature belongs in production.</p><p>A good architect knows the difference between:</p><pre>Interesting<br>      ↓<br>Useful<br>      ↓<br>Production-ready</pre><h3>20. Final Thoughts</h3><p>Java 27 may initially look like a relatively small release.</p><p>There isn’t one massive language feature that completely changes how every Java developer writes code.</p><p>But that is exactly what makes the release interesting.</p><p>Java is increasingly improving at the platform level.</p><p>Better defaults.</p><p>Better memory efficiency.</p><p>Better concurrency.</p><p>Better security.</p><p>Better observability.</p><p>Better alignment with modern hardware.</p><p>For enterprise developers, these improvements can be more valuable than a flashy new syntax feature.</p><p>If you’re building Spring Boot microservices today, I wouldn’t recommend blindly upgrading every production service to Java 27.</p><p>Instead:</p><p><strong>Install it.</strong></p><p><strong>Experiment with it.</strong></p><p><strong>Benchmark it.</strong></p><p><strong>Understand the JVM changes.</strong></p><p><strong>Test your frameworks and agents.</strong></p><p>And most importantly:</p><blockquote><strong><em>Don’t learn Java 27 as a list of JEPs. Learn it as the next step in the evolution of the Java platform.</em></strong></blockquote><p>That mindset is much more valuable for a senior developer, architect, or Principal Engineer.</p><p>Java has been around for more than three decades.</p><p>And it is still evolving.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f24b38cdd57e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JEP 500 in Java 26 Era: Making final Truly Final]]></title>
            <link>https://medium.com/@dkamalkanth/jep-500-in-java-26-era-making-final-truly-final-0c174e92833e?source=rss-5974ae0c7855------2</link>
            <guid isPermaLink="false">https://medium.com/p/0c174e92833e</guid>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[KD]]></dc:creator>
            <pubDate>Mon, 23 Mar 2026 12:07:47 GMT</pubDate>
            <atom:updated>2026-03-24T16:26:36.593Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>In Java, the final keyword is supposed to mean one thing: <strong>no change</strong>.</p><p>We use it to:</p><ul><li>Prevent reassignment</li><li>Build immutable objects</li><li>Ensure thread safety</li></ul><p>But here’s the surprising truth:</p><blockquote><em>For years, </em><em>final fields could still be modified at runtime.</em></blockquote><p>That’s exactly the problem <strong>JEP 500: Prepare to Make Final Mean Final</strong> aims to solve.</p><h3>🧠 What Does final Promise?</h3><p>At a high level, final provides strong guarantees:</p><ul><li>A <strong>final variable</strong> cannot be reassigned</li><li>A <strong>final field</strong> should not change after initialization</li><li>A <strong>final class/method</strong> restricts extension or overriding</li></ul><p>Example:</p><pre>final int x = 10;<br>x = 20; // ❌ Compilation error</pre><p>These guarantees are critical for writing <strong>predictable and safe code</strong>.</p><h3>⚠️ The Hidden Problem</h3><p>Despite these guarantees, Java allowed something unexpected.</p><p>Using reflection, it was possible to modify final fields:</p><pre>Field field = MyClass.class.getDeclaredField(&quot;value&quot;);<br>field.setAccessible(true);<br>field.set(obj, 100); // 😱 Breaks final guarantee</pre><p>Even though the code compiles with final, it could still be changed at runtime.</p><h3>🔥 Why This Matters</h3><p>This isn’t just a theoretical issue — it has real consequences.</p><h3>🧵 Concurrency Risks</h3><p>The Java Memory Model gives special guarantees for final fields:</p><ul><li>Safe publication</li><li>Visibility across threads</li></ul><p>If a final field is modified after construction, these guarantees break.</p><h3>⚡ JVM Optimization Risks</h3><p>The JVM assumes final fields:</p><ul><li>Do not change after initialization</li><li>Can be optimized (e.g., inlining values)</li></ul><p>If modified via reflection:</p><ul><li>The JVM may return incorrect results</li><li>Behavior becomes unpredictable</li></ul><h3>🔐 Security Risks</h3><p>Reflection-based mutation allows:</p><ul><li>Accidental bugs</li><li>Malicious code to alter critical state</li></ul><p>This weakens Java’s reliability guarantees.</p><h3>🛠️ What JEP 500 Introduces</h3><p>JEP 500 aims to fix this gap by <strong>tightening control over </strong><strong>final fields</strong>.</p><h3>Phase 1: Warnings</h3><ul><li>The JVM will warn when code tries to modify final fields using reflection</li></ul><h3>Phase 2: Enforcement (Future)</h3><ul><li>Such modifications will be <strong>restricted or blocked by default</strong></li></ul><h3>🔄 Before vs After</h3><h3>Before JEP 500</h3><ul><li>final could be bypassed using reflection</li><li>Guarantees were not fully enforced</li></ul><h3>After JEP 500</h3><ul><li>final becomes truly immutable</li><li>JVM enforces correctness at runtime</li></ul><blockquote><em>This shifts </em><em>final from a </em><strong><em>best practice → enforced rule</em></strong></blockquote><h3>🧑‍💻 Impact on Developers</h3><h3>Application Developers</h3><ul><li>No major changes in most cases</li><li>Avoid reflection hacks (best practice anyway)</li></ul><h3>Framework Developers</h3><p>This is where the real impact lies.</p><p>Frameworks that rely on reflection must:</p><ul><li>Stop modifying final fields</li><li>Prefer constructor-based initialization</li><li>Use builders or factory methods</li></ul><h3>🧩 Real-World Perspective</h3><p>Many frameworks (like dependency injection or serialization tools) historically used reflection to set fields after object creation.</p><p>While convenient, this approach:</p><ul><li>Breaks immutability</li><li>Introduces hidden bugs</li><li>Violates JVM assumptions</li></ul><p>JEP 500 pushes the ecosystem toward <strong>cleaner and safer design patterns</strong>.</p><h3>✅ Best Practices Going Forward</h3><ul><li>Prefer <strong>immutable objects</strong></li><li>Initialize fields via <strong>constructors</strong></li><li>Avoid setAccessible(true) unless absolutely necessary</li><li>Use modern Java features like <strong>records</strong></li></ul><h3>🎯 Conclusion</h3><p>For years, final was more of a <strong>promise</strong> than a guarantee.</p><p>JEP 500 changes that.</p><blockquote><em>It aligns what Java developers expect with what the JVM actually enforces.</em></blockquote><p>As Java continues to evolve toward safer and more predictable systems:</p><ul><li>Immutability becomes the default</li><li>Reflection becomes more restricted</li><li>And final finally means… <strong>final</strong></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0c174e92833e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>