Weld SiteCommunity Documentation

Chapter 21. Development Mode

21.1. How to enable the development mode
21.1.1. Web application
21.1.2. Weld SE
21.1.3. Is The Development Mode Enabled?
21.2. Development Tools
21.2.1. Probe
21.2.2. Validation Report

Weld comes with a special mode for application development. When enabled, certain built-in tools which facilitate the development of CDI applications, are available.

Note

The development mode should not be used in production as it may have negative impact on the performance of the application. Make sure to disable the development mode before deploying to production.

Warning

Not all environments and containers may support the development mode and all tools. Check the tools details and the container documentation.

This tool allows you to inspect the application CDI components at runtime. There is a default UI - HTML client (single-page application), which is only available in web applications. Just point your browser to protocol://host:port/webappContextPath/weld-probe, e.g. http://localhost:8080/weld-numberguess/weld-probe. However, it’s also posible to obtain the JSON data through the REST API, eventually (if JMX support is enabled) through the MXBean of name org.jboss.weld.probe:type=JsonData,context=ID where ID should be replaced with an idenfitier of an application. Right now, Probe integration is provided for WildFly, Tomcat and Jetty (Weld Servlet), and Weld SE.

Tip

There are some configuration properties which allow to tune or disable Probe features, e.g. to restrict the set of components which will be monitored. See also Section 19.1.11, “Development Mode”.

If a deployment validation fails and the development mode is enabled a simple HTML report is generated. The report contains a lot of useful information such as Weld version, list of enabled beans, list of bean archives, Weld configuration, etc. By default, the report is generated to the user’s current working directory, ie. user.dir. However, it is also possible to specify a path to the target directory using the org.jboss.weld.probe.exportDataAfterDeployment configuration property - see also Section 19.1.11, “Development Mode”.

You should see a similar log message which contains the path to the report file:

=====================================
 Weld - Deployment Validation: FAILED
 ------------------------------------
 HTML report generated to:

 file:///path/to/report/weld-validation-report.html
=====================================

Tip

We encourage you to always attach this report when asking a question on the mailing list or any other communication channel.