Solutions for managing rosters?

Hi all,

I am creating a chat solution for my dev project and would like to have it set up so that when a user is added i can assign them to a set of rosters on the fly. I’ve been researching / experimenting and have come up with a couple things so far, but nothing has proven good yet.

I did some programmatic inserts / updates to the MySQL database that is storing user data for openfire but this is less than ideal because the results of the updates are not set out to the users right away. In most cases i had to restart the server for them to take effect - no good obviously. when i make these changes in the web admin tool, the users are effected immediately.

i am working on setting up an LDAP server - will this be a good solution for my needs? if i can create users and groups on the fly on the LDAP server will those changes be hooked to the rosters (contact lists) and pushed out to the users instantly?

thanks for you help