synchronized ( partitionLookupTree )
{
partitions.put( key, system );
partitionLookupTree.add( system.getSuffixDn(), system );
EntryAttribute namingContexts = rootDSE.get( SchemaConstants.NAMING_CONTEXTS_AT );
if ( namingContexts == null )
{
namingContexts = new DefaultServerAttribute(
schemaManager.lookupAttributeTypeRegistry( SchemaConstants.NAMING_CONTEXTS_AT ),
system.getSuffixDn().getName() );
rootDSE.put( namingContexts );
}
else
{
namingContexts.add( system.getSuffixDn().getName() );
}
}
return system;
}