Enabling CDI Development Mode using Admin Console
The CDI Development Mode can be enabled for a single application during deployment. The Deploy Applications page provides a checkbox to enable the CDI Development Mode for the application. If the checkbox is checked, the CDI development mode is enabled:
After you deploy the application, you should be able to see a message with "Weld Development Mode: ENABLED" in the server’s log file.
|CDI Development Mode will be enabled only if the deployed application contains CDI beans or EJBs.
In the Edit Application page, you can see that the CDI Development Mode checkbox is checked:
In this page, it’s also possible to enable/disable the CDI Development Mode after an application is deployed. Changing the value of the CDI Development Mode checkbox will trigger redeployment of the application to take effect immediately.
The CDI Development Mode can be enabled also globally for all applications. This is configured by setting the system property
true in the server configuration or using JVM startup options.
To set the system property for the server globally, click on server (Admin Server) in the sidebar on the left. Then click on the Properties tab. In the System Properties page, add property with variable name
org.jboss.weld.development and override value set to
true, and press Save:
All applications deployed after this setting is applied will have CDI Development Mode enabled (although the checkbox in the Edit Application page may not always reflect this). To enable it for already deployed applications, it’s necessary to redeploy each application or disable then enable it.