Chapter 52. Configuration Changes in the Tigase Server 5.x

Table of Contents

Reverting To the Old Behaviour
Default Behaviour
Storing Configuration in SQL Database
Going Further
Message Router Implementation is Configurable Too

Artur Hefczyc <> v2.0, June 2014: Reformatted for AsciiDoc. :toc: :numbered: :website: :Date: 2010-01-06 20:22

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 file and tigase.xml file. This is now over.

Reverting To the Old Behaviour

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 file with initial settings and stores all the complete configuration in memory only.

The 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 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 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:

  1. Add a parameter to file:

  2. You can pass a system property to the JVM at the startup time: