DSAnnotationProcessor.applyLdifs( getDescription(), classDS );
}
else
{
// No : define a default class DS then
DirectoryServiceFactory dsf = DefaultDirectoryServiceFactory.class.newInstance();
directoryService = dsf.getDirectoryService();
// enable CL explicitly cause we are not using DSAnnotationProcessor
directoryService.getChangeLog().setEnabled( true );
dsf.init( "default" + UUID.randomUUID().toString() );
// Stores the defaultDS in the classDS
classDS = directoryService;
// Load the schemas
DSAnnotationProcessor.loadSchemas( getDescription(), directoryService );
// Apply the class LDIFs
DSAnnotationProcessor.applyLdifs( getDescription(), directoryService );
}
// check if it has a LdapServerBuilder
// then use the DS created above
if ( classLdapServerBuilder != null )
{
classLdapServer = ServerAnnotationProcessor.createLdapServer( getDescription(), directoryService );
}
if ( classKdcServer == null )
{
int minPort = getMinPort();
classKdcServer = ServerAnnotationProcessor.getKdcServer( getDescription(), directoryService,
minPort + 1 );
}
// print out information which partition factory we use
DirectoryServiceFactory dsFactory = DefaultDirectoryServiceFactory.class.newInstance();
PartitionFactory partitionFactory = dsFactory.getPartitionFactory();
LOG.debug( "Using partition factory {}", partitionFactory.getClass().getSimpleName() );
// Now run the class
super.run( notifier );