Property management

Introduction

The application’s properties can be specified in two ways: using a file that is located in the application’s file system, or via the generic Properties HTTP API resource. The latter is particularly useful for customers that do not have direct access to the file system. Both ways support creating new properties and updating existing ones, even while the application is running. Care needs to be taken when modifying properties in the middle of processing, because they might affect the outcome. This document describes the properties management mechanism in more detail.

Properties file

The file name and path are specified as an application startup parameter (see the Installation Guide for details). All properties that are listed in the file are read and loaded into the system during the application’s startup process. From then on, the file is checked for modifications at a regular interval (that is every 10 minutes). Once a modification is detected, the properties will be reloaded into and immediately taken into effect.

Resource

Properties that are not already listed in the aforementioned file, can be added and modified using the generic/properties HTTP API resource. For more details about generic resources, see the HTTP API guide. The Property entity consists of a name, value, and environment attribute. The first two are self-explanatory, and the third can be used to indicate that it only applies to a certain environment. An environment-specific property takes precedence over a property without an environment. Essentially, the properties are processed in the following order:

  1. File

  2. Property with a matching environment

  3. Property without an environment

The value to which a property’s environment is matched, is the name of the application’s database, which can be determined by running:

select ora_database_name from dual

Example

The following example shows how properties from various sources are resolved by the application. Consider the content of the properties file is as follows:

PROP_1=A
PROP_2=B

And consider the following properties have been created using the resource and are now present in the database:

Environment Name Value

ENV_1

PROP_2

C

ENV_1

PROP_3

D

ENV_2

PROP_3

E

PROP_3

F

ENV_2

PROP_4

G

PROP_4

H

Now, on environment ENV_1, the properties will be resolved as follows:

Name Value Explanation

PROP_1

A

Only present in the properties file

PROP_2

B

A matching environment-specific value exists in the database, but the value specified in the file takes precedence

PROP_3

D

Specified in the database for ENV_1, ENV_2, and without an environment. So, the matching environment-specific value takes precedence

PROP_4

H

Environment-specific value exists, but referring to a different environment, so the generic value is used