Is it possible to access DB config changes in plugin without server restart

Wayne Weber
Added over 5 years ago

Wondering if there was a way to make configuration changes in the database and have them readable in a plugin.

One possible approach might be to have data in "tig_pairs" under a "config" node to be read into "" periodically (say every minute) and then the plugin could call "System.getProperty" to read properties periodically. In this manner, the plugin could be centrally configured via the database and Tigase wouldn't have to be restarted when the configuration changed.

Is there any such mechanism currently existing in Tigase?


Wayne Weber

Replies (1)


Added by Artur Hefczyc TigaseTeam over 5 years ago

tigase.conf.Configurator component is exactly what you want to look at. This is the component responsible for maintaining the Tigase server configuration. Some details on this are here:

There is an option to keep configuration in DB already.

In principle, the idea is that plugins or components do not store and maintain configuration on their own. The Configurator manages the configuration and if there is any change it pushes config changes to the correct component or plugin.

You can update the configuration via admin ad-hoc commands or through a database.