powered by Jive Software

Is it possible to control everything server side using MySQL storage?

I want to control all aspects of Jabber on the server side. The administrator will create the rosters, groups, usernames. passwords, nicknames, profiles, everything. I want the client to have zero control of editing anything (nicknames, passwords, etc).

I would like to have this done in the MySQL store I set up with Openfire so I can write scripts to add/edit/modify all existing entries. Whenever anything is editied in MySQL, clients will see the change immediately.

I can edit everything in MySQL now, change passwords, nicknames, et cetera. However, whenever I load a Jabber client it ignores any changes to the roster, nickname I made in MySQL and chooses the client side ones.

Is it possible to force the client to use the changes I made on the server side? I have tried looking in the forums and documetation but have not found anything that would suggest this is possible. Has anyone tried this or even know if it’s possible? Can you point me in the right direction, perhaps?

Thank you very much in advance!


Hi John,

Openfire uses a database cache, so you can purge the cache manually on page http://server:9091/system-cache.jsp or write a script which does this.

The recommended way to change things within the database is to write a plugin (or use an existing one) which uses the internal Openfire API.


Thanks for your quick reply! This sort of works. When I clear the cache, the changes don’t take effect on the client side until they log out and back in again. Is there a way to make the changes happen without logging out and in? Is there a way to remove the cache - would doing this make all changes live? Or is this not possible?

Also, is there a way to not allow users to change their nicknames or any other preferences? Is this done with the API?


you could send out new vCards or presence states, depending on the things you change. Even if you use the API the changes will as far as I know not be broadcasted to the clients as this would cause a lot of network traffic. One could use the API to do this or to iterate through all connected clients and send updated information - for clients within a LAN this should not be a problem.

You can intercept all packets and filter subscription requests, file transfer initiation or even vCard update packets. As far as I know the Enterprise Plugin allows to block vCard updates and file transfer initiation. Blocking subscription requests and file transfer initiation is also possible with free available plugins, so you may want to take a look at the source code (inside openfire.src.zip) of the plugins.

MySQL may also have an option to make a table or column read-only - this should cause exceptions within Openfire when one tries to change the nickname but it should work.