Issue
- We needed to programmatically configure the "Module Definition Timeout (seconds)" setting found under System Settings > Infrastructure > JavaScript Loader in the Liferay UI. Specifically, we were looking for a way to set this value using a system property or configuration file, such as
portal-ext.properties, instead of managing it through the UI.
Environment
-
Liferay DXP 2024.Q1
-
Configuration management via
portal-ext.propertiesor OSGi configuration files
Resolution
-
This setting can be configured programmatically. The following two methods are available:
1. portal-ext.properties
Add the following line to theportal-ext.propertiesfile (replace170with the desired timeout value):2. OSGi Configuration File
Create a file named:Place it under the
osgi/configsdirectory with the following content: - These options allow the "Module Definition Timeout" to be managed outside the Liferay UI, enabling automated or scripted configuration as needed.