if ( partition == null )
{
String msg = I18n.err( I18n.ERR_34, key );
LOG.error( msg );
throw new LdapNoSuchObjectException( msg );
}
String partitionSuffix = partition.getSuffixDn().getName();
// Retrieve the namingContexts from the RootDSE : the partition
// suffix must be present in those namingContexts
Attribute namingContexts = rootDse.get( SchemaConstants.NAMING_CONTEXTS_AT );
if ( namingContexts != null )
{
if ( namingContexts.contains( partitionSuffix ) )
{
namingContexts.remove( partitionSuffix );
}
else
{
String msg = I18n.err( I18n.ERR_35, key );
LOG.error( msg );
throw new LdapNoSuchObjectException( msg );
}
}
// Update the partition tree
synchronized ( partitionLookupTree )