4.2.8.3. Storing Properties in the Database

Runtime parameters are stored in SYS_CONFIG table.

Such properties have the following distinctive features:

  • As the property value is stored in the database, it is defined in a single location, regardless of the application blocks in which it is used.

  • The value can be changed and saved at runtime both using configuration interface, containing this property, or ConfigStorageMBean.

  • Property value can be overridden for a particular application block in its app.properties files. Value search is always done in two stages – in app.properties first, then if not found – in the database.

The properties kept in the database are cached on the Middleware. You can clean the cache via ConfigStorageMBean JMX interfaces using clearCache() method or via CachingFacadeMBean using clearConfigStorageCache() method.

It is important to mention, that retrieving DB-stored properties on the client side leads to Middleware requests. This is less efficient than retrieving local properties from app.properties files. To reduce the number of such requests the client caches all the properties, kept in the DB, for the lifetime of configuration interface implementation instance. Thus, if you need to access the properties of a configuration interface from some UI screen for several times, it is better to get the reference to this interface at screen initialization and save it to a screen controller field for further access.