How to I get the instance of XMPPServer

I’'m sure my XMPPServer was running. When i write my java codes such as

XMPPServer server = XMPPServer.getInstance();

but the server is always return null,what happen?

another question is

i using sql language to modify my groups and users,but server cannot update list immediately, i have to restart the server and then server would be reload the database, how could i make the server reload the database as soon as possible?

i’'m sorry about my poor English.

Where are you calling XMPPServer.getInstance() from? Is this in a plugin?

Also, if you update the database directly and want those changes to show up, you’'ll have to clear the cache. For example, look at how the UserManager uses the userCache.

Regards,

Matt

I try the java code in my Linux console.