Is it possible to access DB config changes in plugin without server restart
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 "System.properties" 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?
Added by Artur Hefczyc 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: http://www.tigase.org/content/configuration-changes-tigase-server-5x
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.