@Override
        public void run() {
            LOG.info("running sync with crowd...");
            CrowdManager manager;
            try {
                manager = CrowdManager.getInstance();
            } catch (Exception e) {
                LOG.error("Failure to load the Crowd manager", e);
                return;
            }
            
            List<String> allGroups;
            try {
                allGroups = manager.getAllGroupNames();
            } catch (RemoteException re) {
                LOG.error("Failure to fetch all crowd groups name", re);
                return;
            }
            
            if (allGroups != null && !allGroups.isEmpty()) {
                CrowdGroupProvider.lock.writeLock().lock();
                try {
                    CrowdGroupProvider.groups = allGroups;
                } finally {
                    CrowdGroupProvider.lock.writeLock().unlock();
                }
            }
            
            LOG.info("crowd sync done, returned " + (allGroups == null ? "no" : allGroups.size()) + " groups");
        }
@see org.jivesoftware.openfire.group.AbstractGroupProvider#search(java.lang.String, java.lang.String)
xmppserver/src/main/java/org/jivesoftware/openfire/crowd/CrowdGroupProvider.java