We are integrating OpenFire in a portal application we are building. We are currently using custom user, group, and authentication providers in order to maintain the user database in our own schema. Because the users are not just OpenFire users, but rather users of the whole system, the information we need to administer for each user forces us to have our own administration screens; we cannot use the OpenFire admin screens to manage users because we want to manage all of the user information in one place and OpenFire only supports maintaining a minimal set of fields relevant to the chat functionality.
The custom providers (which are read-only) are working fine except for one thing. If we create a new user via our admin screen, OpenFire does not recognize the new user until we restart OpenFire or forcibly flush the user cache to force OpenFire to re-read the users from our custom provider.
We need a way from our custom application to make OpenFire aware that a new user has been created. Several alternatives have been explored, but the most appealing would be to have our application connect to OpenFire using HTTP and send a registration notification. However, I am wondering if anyone has examples they can share of using HTTP bind to connect to the server and send a registration packet to add the new user. Note that the user really doesn’t have to be added per se (it is already in our database by this time), but the goal is just to make sure OpenFire knows about the new user. Alternatively, if there is a way to forcibly flush the user cache via HTTP, we might also consider this approach. I understand that this would defeat somewhat the intent of the cache, but we don’t expect user creation to be costly or frequent enough to be a big issue for us.
Finally, I am also open to other suggestions regarding how to achieve our goal so feel free to offer any suggestions or comments.