Table of Contents
The whole configuration framework for the Tigase server has been redesigned and rewritten. This was done to cleanup all the configuration code and logic and also extend the current functionality and allow for configuration storage in different kinds of repositories - memory, file, database, …
The title says configuration changes but the version 5.x still follows our policy about backward compatibility so the changes should be rather called extensions.
There is however one change which can affect a few users. Those who use the server and worked with it’s configuration remember the mess and confusion related to duality in the server configuration - the init.properties file and tigase.xml file. This is now over.
While using the tigase.xml file is still possible and the whole old behaviour can be preserved it is now disabled by default. By default the Tigase server reads only init.properties file with initial settings and stores all the complete configuration in memory only.
The init.properties works exactly as before and all old parameters are still working exactly as before. The only difference is the lack of the tigase.xml which is not created by default and is not read by default if it is present. The main advantage is that you don’t have to remove it each time you change something in the init.properties to pick up new settings.
I will first present how to revert to old behaviour as this might be critical to some existing systems which want to upgrade. This is actually very simple to accomplish. The Tigase server now, offers pluggable repository support. This means that you can easily extend current functionality with a different configuration storage by writing own class which reads and writes configuration parameters.
By default class tigase.conf.ConfigurationCache is loaded which stores configuration in memory only.
Please note, the init.properties file is always read if it exists at given location.
To revert to the old behaviour you just need to pass a parameter to the Tigase server with a class name which is responsible for keeping server parameters in the old XML file. You can do it in two ways:
Add a parameter to init.properties file:
You can pass a system property to the JVM at the startup time: