Custom Configuration
The custom configuration section in our xdb component instance definition
is specific to the data storage mechanism that we’re going to be using.
In this case, it’s the xdb_file mechanism, and so we have the custom
configuration wrapped by a tag qualified with a namespace to match:
<xdb_file xmlns="jabber:config:xdb_file"> <spool><jabberd:cmdline flag="s">./spool</jabberd:cmdline></spool> </xdb_file>
Again, the tag name xdb_file is unimportant; the part that must be
correct is the namespace
jabber:config:xdb_file.
The configuration describes a single setting: where the spool area
is. This, in the context of our xdb_file mechanism, is the root
directory within which hostname-specific directories are created
and used to store JID-specific and global XML datafiles. As the configuration
stands here, the value (./spool) can be overridden
at server startup time with the -s switch.
There is another configuration tag available for use here too. Using the
configuration as it stands here, the xdb_file component would cache data
indefinitely; if you were to modify data directly in the files in the
spool area,
the modifications wouldn’t have any effect for data that had already
been retrieved for a JID in the course of a server’s uptime.[6]
In other words, once data has been read from the file, it is cached until
the server is stopped.
The <timeout/> configuration tag can be employed to control this caching. Used with a value that represents a number of seconds, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access