Debugging Jakarta CDI Applications: A Quick Intro to Payara Server’s CDI Tools

Community

Payara Server offers integrated tools that streamline your development experience when working with Jakarta CDI (Contexts and Dependency Injection) in your applications. In this post, we’ll take a look at the CDI Development Mode available in Payara Server and the CDI Probe it offers.

What is CDI Development Mode?

CDI Development Mode provides key tools and features that help you simplify the process of developing, inspecting and debugging CDI-backed applications. It allows for a much smoother development workflow.

The CDI Probe

Think of the CDI Probe as an x-ray machine. It gives you in-depth visibility into the CDI beans in your applications at runtime. You can monitor their behaviour, inspect their properties and diagnose potential issues.

Enabling CDI Development Mode

There are three ways to activate CDI Development Mode for your applications:

  • During Deployment: When deploying your application using either the asadmin CLI or the Admin Console, enable it using a checkbox or a property.
  • Web Application Configuration: Embed a context parameter within your application’s web.xml file to automatically enable CDI Development Mode.
  • Global Server Setting: Set a system property (org.jboss.weld.development=true) to enable CDI Development Mode for all applications deployed to your Payara Server.

Important: If you enable CDI Development Mode using multiple methods, the options that enable it take precedence and cannot be overridden.

Accessing the CDI Probe

Once CDI Development Mode is active, you have various ways to use the CDI Probe:

  • REST API: Interact with the CDI Probe programmatically through its REST interface (for data integration or automation).
  • Web Application: Access the intuitive CDI Probe web application directly within your browser or via a convenient link from the Payara Server’s Admin Console.
  • Web Page Toolbar: If your application has web pages, CDI Development Mode adds a toolbar that provides swift access to the CDI Probe and bean invocation details.

What the CDI Probe Can Do

The CDI Probe provides a glimpse into the intricate workings of your Jakarta CDI beans, giving you detailed debugging capabilities. It allows you to:

  • Break down Bean Architecture: Visualise the dependencies between your CDI beans.  This helps simplify complex architectures, making them easier to maintain and modify. It’s particularly useful for onboarding new developers or when working with legacy code.
  • Dig into Bean Data: Inspect the current state of your beans, including properties, fields and their values. This allows for real-time debugging – you can watch variables change in response to user inputs or system events, showing the true flow of data within your application.
  • Track Event Sequences: Observe CDI bean events as they fire in real-time, providing a detailed timeline of bean interactions within your application.  Pinpoint the exact triggers leading to specific consequences, enabling you to debug complex event-driven systems or verify that your logic behaves as intended.
  • Unravel Execution Paths:  Step through the chain of bean invocations as your application executes. This offers a powerful way to identify performance issues, find unexpected method calls or simply understand the intricate flow of control.

Summary

In essence, the CDI Probe allows you to proactively debug, maintain and optimise your Jakarta EE CDI applications in a simplified and intuitive way. Take a look at the detailed documentation page and download a copy of Payara Server Community today to get started using the CDI Tools!

{{cta(‘b2e4c2b6-f33a-4ae4-9290-f1cf476f445a’)}}

Branding Tagline_Hubspot Banner-1

 

Comments (0)

Post a comment

Your email address will not be published. Required fields are marked *

Payara needs the contact information you provide to us to contact you about our products and services. You may unsubscribe from these communications at any time. For information on how to unsubscribe, as well as our privacy practices and commitment to protecting your privacy, please review our Legal & Privacy Policy.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Posts

SpringBoot Actuator Health for Microprofile Developers 7 minutes
Cloud & Microservices

Spring Boot Actuator Health for MicroProfile Developers

If you worked with MicroProfile Health, you already understand the value of exposing application health information through standardized endpoints. […]

Webinar banner for “High-Frequency Trading on Jakarta EE: GC Stress Testing with Azul C4 and Payara Micro,” March 25, 2026, 2 PM GMT. Features Azul and Payara Micro logos and speaker photos of Luqman Saeed, Jakarta EE Specialist, and Simon Ritter, Deputy CTO and Java Champion. 1 minute
Cloud & Microservices

High-Frequency Trading on Jakarta EE: Join Our Upcoming Live Webinar

Modern high-frequency trading (HFT) platforms operate under extreme performance constraints, processing tens of thousands of messages per second while […]

Illustration promoting the Payara Platform Community Survey, featuring bold text on a blue background alongside a clipboard with a checklist, star ratings, and check marks, with coral and fish graphics in an underwater theme. 1 minute
Community

Help Shape the Future of Payara Platform Community – Take Our 2026 Survey

Earlier this week, we’ve launched the 2026 Payara Platform Community Survey and we’d love to hear from you. If […]