requestControls.add(new LDAPControl(OID_INTERNAL_GROUP_MEMBERSHIP_UPDATE,
false));
for (DN configEntryDN : groupImplementations.keySet())
{
SearchFilter filter;
Group groupImplementation = groupImplementations.get(configEntryDN);
try
{
filter = groupImplementation.getGroupDefinitionFilter();
if (backend.getEntryCount() > 0 && ! backend.isIndexed(filter))
{
logError(WARN_GROUP_FILTER_NOT_INDEXED.get(String.valueOf(filter),
String.valueOf(configEntryDN), backend.getBackendID()));
}
}
catch (Exception e)
{
if (debugEnabled())
{
TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
// FIXME -- Is there anything that we need to do here?
continue;
}
for (DN baseDN : backend.getBaseDNs())
{
try
{
if (! backend.entryExists(baseDN))
{
continue;
}
}
catch (Exception e)
{
if (debugEnabled())
{
TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
// FIXME -- Is there anything that we need to do here?
continue;
}
InternalSearchOperation internalSearch =
new InternalSearchOperation(conn, conn.nextOperationID(),
conn.nextMessageID(), requestControls,
baseDN,
SearchScope.WHOLE_SUBTREE,
DereferencePolicy.NEVER_DEREF_ALIASES,
0, 0, false, filter, null, null);
LocalBackendSearchOperation localSearch =
new LocalBackendSearchOperation(internalSearch);
try
{
backend.search(localSearch);
}
catch (Exception e)
{
if (debugEnabled())
{
TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
// FIXME -- Is there anything that we need to do here?
continue;
}
lock.writeLock().lock();
try
{
for (SearchResultEntry entry : internalSearch.getSearchEntries())
{
try
{
Group groupInstance = groupImplementation.newInstance(entry);
groupInstances.put(entry.getDN(), groupInstance);
refreshToken++;
}
catch (Exception e)
{