Configuration

A Gateway application’s runtime behaviour is defined by its configuration.

The Gateway application can be started with only bootstrap configuration or with only a configuration file or with combination of both bootstrap configuration and configuration file.

The configuration of the application can be viewed and managed via the Diffusion management console. Service and shared configuration can be added/updated/removed during runtime using the console. See Managing Gateway applications for more details. Since application configuration can change during runtime, the active configuration of the application is persisted in the Diffusion server. See Configuration persistence for more details.

Configuration for the application is divided into two types based on whether it can be changed or not:

  • Dynamic configuration - Can be altered during runtime. Examples include configuration for services and sharedConfigs.

  • Static configuration - Remains fixed during runtime. Examples include the Diffusion and global configuration.

If the configuration stored on the server differs from that provided to the application at startup, this conflict is resolved differently for static versus dynamic configuration. Static configuration provided to the application always overwrites configuration on the server, while the dynamic configuration used will depend on the value set for the gateway.config.use-local-services bootstrap configuration. Ultimately, the configuration updated on the server would be the overall configuration used in the application.

NOTE:

If the application is started without a configuration file, default configuration values are used and stored on the server.

Upon restarting the application, the configuration stored on the server is used to set up sharedConfigs and initialize services. This mechanism can be overridden by setting the gateway.config.use-local-service system property, as defined in here.