Application mode

The ability to modify the configuration and the state of the application during runtime can be configured using a global configuration parameter called mode. There are two application modes; STATIC and DYNAMIC. This can be set in the configuration file.

The ’DYNAMIC’ mode is the default mode used. If the configuration file is not passed, the application will run in DYNAMIC mode. To enable the STATIC mode, it should be set in global configuration for framework in the configuration file.

  • DYNAMIC: This option allows modification of the application and services configuration and their state during runtime. This is the default option. In this mode, if the application is started without a local configuration file, the configuration is retrieved from the server. This means that an application can start up initially with no configuration at all, and all aspects (such as services) can then be defined using the console. The configuration that is saved at the server can be removed using the console, to remove any record of an application. Once the configuration is saved at the server, the console can view available applications, even if they are not connected to the server. Additional bootstrap configurations can be set when running the application in DYNAMIC mode. These are gateway.config.use-local-services and gateway.config.auto-save-to-file. Additional details about these configurations can be found here.

  • STATIC: This option restricts modification of the application and services configuration and their state during runtime. Hence, only services configured in the configuration file will be initialized in the application. Services and sharedConfigs cannot be added/updated/removed during runtime. In addition, the application or services cannot be paused/resumed from the console. However, you can view the overall configuration and initialized services in the Console.