Bootstrap configuration
An application can be started without a configuration file, by passing only bootstrap configuration.
Bootstrap configuration includes details required to connect to the Diffusion server, and to register the application with the server. The Gateway framework provides an option to set these bootstrap details as system properties or environment variables, which are used by default, if they are not set in the configuration file.
If a bootstrap configuration is set in both the system property and environment variable, the value of the environment variable will take precedence over the system property. |
The allowed system/environment properties are:
Property | Use |
---|---|
|
The Diffusion server URL. |
|
The name of the Diffusion principal (user name) to be used to connect to Diffusion. |
|
The Diffusion password for the specified principal. |
|
The identifier of the gateway application instance. |
|
The path of configuration file to be used. |
|
A boolean value to specify whether to use service and sharedConfig configuration from the local file, or from the server when application is initialized. |
|
A boolean value to specify whether to save configuration changes during runtime in the passed config file. |
|
The path of the directory containing any external JARs and zipped files to use with the application. JAR files containing payload converters or custom publishers can be added to this external directory to be loaded in the classpath of the application during startup. |
|
The base path of the directory that contains any Gateway adapter
resources. If this is set, it will be used to resolve the directory specified by
the |
Starting the application using only bootstrap configuration
Use:
java -jar -Dgateway.diffusion.url=ws://localhost:8080 -Dgateway.diffusion.principal=admin -Dgateway.diffusion.password=password -Dgateway.client.id=application-1 application-2.2.0_RC2.jar
The framework attempts to retrieve any previous configuration from the server. If not found, then it assumes the application is starting with an empty configuration. When starting with empty configuration the application can be configured from the Diffusion console.