ManagementContext mCtx = LDAPManagementContext.createFromContext(
JNDIDirContextAdaptor.adapt(ctx));
RootCfgClient root = mCtx.getRootConfiguration();
LocalDBBackendCfgClient backend =
(LocalDBBackendCfgClient)root.getBackend(backendName);
LocalDBIndexCfgClient index = backend.getLocalDBIndex(attributeName);
if (!indexTypes.equals(indexToModify.getTypes()))
{
index.setIndexType(indexTypes);
}
if (entryLimitValue != index.getIndexEntryLimit())
{
index.setIndexEntryLimit(entryLimitValue);
}
index.commit();
}