try
{
um = (UserManager) getService(UserManager.ROLE, svcConfig.getHint(UserManager.ROLE));
gm = (GroupManager) getService(GroupManager.ROLE, svcConfig.getHint(GroupManager.ROLE));
User u = um.find(User.Property.NAME, loginName);
Configuration[] domains = configuration.getChildren("domain");
for (int i = 0; i < domains.length; i++)
{
Configuration oneDomain = domains[i];