Customizing Centralized Properties
This feature gives the ability to add, modify, and remove properties in one file. The properties are propagated to the specified property files. The template process, which is part of the initialSetup step, will look at the files in etc/cm_properties.ini (this can be created as a Customer Customization). If the file exists, the content will be processed for the relevant properties.
NOTE: Product teams might use this file format: etc/<PROD>_properties.ini (where <PROD> could be one of the list of installed products included in etc/PRODUCT.txt). If it exists, it will be processed as well.
Example cm_properties.ini
The following denote the type of entries that could be included in cm_properties.ini and relevant type of action:
<PROPERTIES_FILE>:<PROPERTY_NAME>=<VALUE>
Override <PROPERTY_NAME> in <PROPERTIES_FILE> with <VALUE> if it exists.
Insert <PROPERTY_NAME> in <PROPERTIES_FILE> with <VALUE> it does not exist.
<PROPERTY_NAME>=<VALUE>
Override <PROPERTY_NAME> in all property files with <VALUE>, if <PROPERTY_NAME> exists.
<PROPERTIES_FILE>:<PROPERTY_NAME>=[DELETE]
Remove <PROPERTY_NAME> from <PROPERTIES_FILE> if it exists.
<PROPERTY_NAME>=[DELETE]
Remove <PROPERTY_NAME> from all property files, if <PROPERTY_NAME> exists.
Template example: hibernate.service.properties.template
hibernate.user = @DBUSER@
hibernate.pass = @DBPASS@
hibernate.ucp.validate_connection = true
Sample ENVIRON.INI
The following is an example ENVIRON>INI:
DBUSER=cisadm
Sample cm_properties.ini
The following is the content of an example cm_properties.ini:
hibernate.service.properties.template:hibernate.user=clouduser
hibernate.password=cloudpwd
hibernate.iws.properties.template:hibernate.user=clouduser
hibernate.service.properties.template:hibernate.ucp.validate_connection=[DELETE]
hibernate.service.properties.template:new.property=test
Result of hibernate.service.properties generated properties file
The following is a sample result of hibernate.service.properties generated properties file:
### The following line was overridden because <PROD>_properties.ini file setting:
hibernate.user=clouduser
### The following line was overridden because <PROD>_properties.ini file setting:
hibernate.password=cloudpwd
### The following line was deleted because <PROD>_properties.ini file setting:
# hibernate.ucp.validate_connection = true
### The following line was appended because <PROD>_properties.ini file setting:
new.property = test
Result of hibernate.iws.properties generated properties file
The following is a sample result of hibernate.iws.properties generated properties file:
### The following line was overridden because <PROD>_properties.ini file setting:
hibernate.user=clouduser
### The following line was overridden because <PROD>_properties.ini file setting:
hibernate.password=cloudpwd