The Dev mode is useful for debugging container configuration, CSS and JavaScript.
In Tomcat
In eXo Platform Tomcat, the Dev mode is turned on by appending --dev
to the startup command: ./start_eXo.sh --dev.
This parameter will add the following system properties:
-Dorg.exoplatform.container.configuration.debug
-Dexo.product.developing=true
In JBoss
In eXo Platform JBoss, the --dev
parameter is not supported.
You need to customize environment variables to have the following variable:
EXO_DEV=true
.
In Native Installer
To turn on this mode in Native Installer, you have to customize environment variables and edit the following variables:
EXO_DEV=true EXO_JCR_SESSION_TRACKING=true EXO_TOMCAT_UNPACK_WARS=true
Then restart Tomcat for these changes to take effect.
Effects of Dev mode
Hereafter are effects of the Dev mode:
Magic locale - A language option called magic locale - with the code ma - is added. It is useful for debugging localization resource. In this language, all labels are displayed as the resource name instead of the translated values:
JavaScript and CSS debug - For optimizing performance, eXo Platform merges, minifies and compresses all CSS/Stylesheet resources into one at the startup. This reduces requests to the server, so performance will be improved, but this causes developers to restart the server for any CSS resource modification to take effect (similar to JavaScript). So in the Dev mode, the feature (JavaScript/CSS compressor) will be disabled for easy debugging.
Container configuration debug - The Dev mode turns on logging information of the configuration retrieval process. At the startup, you will see logs as below:
INFO | Add configuration jar:file:/D/platform-4.2/lib/exo.kernel.component.common-2.4.8-GA.jar!/conf/portal/generic-configuration.xml [e.k.container.ConfigurationManagerImpl<Catalina-startStop-1>] INFO | Add configuration jndi:/localhost/portal/WEB-INF/conf/configuration.xml [e.k.container.ConfigurationManagerImpl<Catalina-startStop-1>] INFO | import jndi:/localhost/portal/WEB-INF/conf/common/common-configuration.xml [e.k.container.ConfigurationManagerImpl<Catalina-startStop-1>] INFO | import jndi:/localhost/portal/WEB-INF/conf/common/resource-compressor-configuration.xml [e.k.container.ConfigurationManagerImpl<Catalina-startStop-1>]
Moreover, the Dev mode allows the hot re-loading of configuration. You can modify container configuration without restarting the server. The hot re-loading can be done via JMX clients, such as JConsole, as follows:
Connect JConsole to the eXo Platform process.
Find an MBean with object name: exo:container=root
.
Run the reload()
operation.
See more details in eXo Kernel reference.
Unpacking .war files (Tomcat) -
Particularly to eXo Platform Tomcat in the Dev mode, the startup scripts also set EXO_TOMCAT_UNPACK_WARS=true
that results in decompressing .war archives in webapps folder.