public static class MyFactory implements DirectoryServiceFactory
{
public DirectoryService newInstance() throws NamingException
{
DirectoryService service = new DefaultDirectoryService();
service.getChangeLog().setEnabled( true );
JdbmPartition partition = new JdbmPartition();
partition.setId( "apache" );
partition.setSuffix( SUFFIX_DN );
HashSet<Index<?, ServerEntry>> indexedAttributes = new HashSet<Index<?, ServerEntry>>();
indexedAttributes.add( new JdbmIndex<String,ServerEntry>( "objectClass" ) );
indexedAttributes.add( new JdbmIndex<String,ServerEntry>( "ou" ) );
indexedAttributes.add( new JdbmIndex<String,ServerEntry>( "uid" ) );
partition.setIndexedAttributes( indexedAttributes );
Set<Partition> partitions = new HashSet<Partition>();
partitions.add( partition );
service.setPartitions( partitions );
return service;
}