Properties file
management
Some configurable features of the runtime are controlled
by defining properties in one of the properties files, in
the runtime's base installation directory. The properties files are read at runtime startup
time.
Properties file management
Configuration of properties and properties file management is an advanced topic. In most cases, you will be directed to this information and the configuration options based on interaction with your support representative.
The runtime's base installation directory is generally
/opt/dw/dwcore for Linux C:\Program Files\deviceWISE\Gateway\dwcore for Windows.
Some products have an alternative runtime base installation
directory.
- Most Asset Gateway products only have a
dwcore.properties file.
- Most Enterprise Gateway products have a
dwcore.properties file and a dwcore.platform.properties
file.
- All Asset Gateway and Enterprise Gateway products
support additional properties files, named using the
convention:
dwcore.<user_defined>.properties
- Where <user_defined> is any valid operating system filename string.
- For example:
dwcore.solution.properties.
- Beginning with the 18.2.2 release, a separate
properties file naming convention is also supported:
user.<user_defined>.properties
- This support of user.<user_defined>.properties files is in addition to the previous support of dwcore.<user_defined>.properties.
- For example: user.solution.properties.
- The new file naming convention was added to
help clarify the user defined properties files
and to separate out the order of the reading of
the user defined properties files from
dwcore.platform.properties.
During runtime start up time, the properties files are read in the following order:
- dwcore.properties
- Then any other
dwcore.<user_defined>.properties
files.
- The dwcore.platform.properties file falls into this category.
- The order of reading the
dwcore.<user_defined>.properties files is
non-deterministic across platforms. Some
platforms read the files in alphabetical order,
but this can not be relied on.
- Beginning with the 18.2.2 release, then any
user.<user_defined>.properties
files.
- This support of user.<user_defined>.properties files is in addition to the support of dwcore.<user_defined>.properties files.
- The order of reading the user.<user_defined>.properties files is non-deterministic across platforms. Some platforms read the files in alphabetical order, but this can not be relied on.
Properties, System Variables and default values
Some of the runtime's properties are present in the properties files. Other properties are not present in the provided properties files, but have a default value in the code.
Many of the properties and their current values for a node can be seen using the Workbench -> Administration -> System Variables tab.
As properties are read from the various properties files, if a property is duplicated (same property name is read a second time), the value from the second reading of the property is used.
This means that the property's value in a user defined properties file, such as user.solution.properties, will override the property's value in the dwcore.properties or dwcore.platform.properties file.
For release 18.2.1 or earlier, the
user.<user_defined>.properties support does not
exist. User specific properties should be added to a
dwcore.<user_defined>.properties file.
The order of reading the
dwcore.<user_defined>.properties files is
non-deterministic across platforms. Some platforms read the
files in alphabetical order, but this can not be relied
on:
- You should test and verify the processing of the files and use of the properties values on your system, using the Workbench -> Administration -> System Variables tab to view the property and value being used.
- The name of the dwcore.<user_defined>.properties file can be modified so that it comes alphabetically after dwcore.platform.properties. For example: dwcore.solution.properties.
Product installation or update
Product installations (.exe, .sh, .ipk, and other installation formats) and product updates (using a .dwu file and the Workbench -> Administration -> Node Administration tab Update Firmware feature or using the SUP feature) will overwrite the dwcore.properties file, and (if it exists for the product) the dwcore.platform.properties file.
It is suggested that all properties that are changed
from their defaults, be defined in a user defined
properties file, such as user.solution.properties. For
release 18.2.1 or earlier, use a user defined properties
file, such as dwcore.solution.properties.
Properties files overwritten
- Because the dwcore.properties file and the
dwcore.platform.properties files are
overwritten, properties that are changed from
their default values should be maintained in a
user defined properties file, such as
user.solution.properties (or
dwcore.solution.properties).
- When using the Node Back Up feature of the Workbench to create a backup file of the node's configuration and settings, be aware that properties files are not included in the Node Back Up output file. Properties files must be handled separately.