throws NoSuchRealmException, BadRealmException,
InvalidOperationException, NoSuchUserException {
//account for updates to file-realm contents from outside this config
//which are sharing the same keyfile
realmsManager.refreshRealm(config.getName(), realmName);
Realm r = realmsManager.getFromLoadedRealms(config.getName(), realmName);
if (r != null) {
return getGroupNames(r, userName);
}
List<AuthRealm> authRealmConfigs = config.getSecurityService().getAuthRealm();
for (AuthRealm authRealm : authRealmConfigs) {