Configuration persistence
The configuration passed to the application during start up, or added,
or updated via the Diffusion Management console at runtime, is persisted in the
Diffusion server. When running the application in DYNAMIC
mode, if an
application is started with only bootstrap configuration, and
configuration for the passed gateway application ID is available in the
server, it will be used to instantiate the application, unless
overridden using the use-local-services
property as described below.
Use of use-local-services
When an application is started for the first time with bootstrap configuration, it is registered with the Diffusion server. Its bootstrap configuration and other configuration (if passed via the configuration file) will be persisted in the Diffusion server. Any configuration changes made at runtime from the Diffusion console will be also persisted to the server.
To use the services and sharedConfigs defined in the local configuration
file, in preference to the configuration from the server - when
re-starting an application, the boolean bootstrap property
gateway.config.use-local-services
can be used. By default this is
false
.
The following table shows the outcomes for the various possibilities
relating to a local configuration file being supplied, configuration
available at the server, and the use of the use-local-services
value :
Local file supplied | Server config available | use-local-services | Action |
---|---|---|---|
Y |
Y |
false |
Diffusion and global configuration taken from file (or system properties). |
Y |
N |
false |
All configuration from the local file is used. |
N |
N |
false |
Bootstrap configuration from properties. |
Y |
n/a |
true |
All configuration from the local file is used and replaces anything at the server |
N |
n/a |
true |
Gateway Framework throws exception and terminates |