// --------------------------------------------------------------------
// Initialize schema partition
// --------------------------------------------------------------------
JdbmPartition schemaPartition = new JdbmPartition();
schemaPartition.setId( "schema" );
schemaPartition.setCacheSize( 1000 );
DbFileListing listing;
try
{
listing = new DbFileListing();
}
catch( IOException e )
{
throw new LdapNamingException( "Got IOException while trying to read DBFileListing: " + e.getMessage(),
ResultCodeEnum.OTHER );
}
Set<Index<?,ServerEntry>> indexedAttributes = new HashSet<Index<?,ServerEntry>>();
for ( String attributeId : listing.getIndexedAttributes() )
{
indexedAttributes.add( new JdbmIndex<Object,ServerEntry>( attributeId ) );
}
schemaPartition.setIndexedAttributes( indexedAttributes );
schemaPartition.setSuffix( ServerDNConstants.OU_SCHEMA_DN );
schemaPartition.init( this );
// --------------------------------------------------------------------
// Enable schemas of all indices of partition configurations
// --------------------------------------------------------------------
/*
* We need to make sure that every attribute indexed by a partition is
* loaded into the registries on the next step. So here we must enable
* the schemas of those attributes so they are loaded into the global
* registries.
*/
SchemaPartitionDao dao = new SchemaPartitionDao( schemaPartition, registries );
Map<String,Schema> schemaMap = dao.getSchemas();
Set<Partition> partitions = new HashSet<Partition>();
partitions.add( systemPartition );
partitions.addAll( this.partitions );
for ( Partition partition : partitions )
{
if ( partition instanceof BTreePartition )
{
JdbmPartition btpconf = ( JdbmPartition ) partition;
for ( Index<?,ServerEntry> index : btpconf.getIndexedAttributes() )
{
String schemaName = null;
try
{