Class SimpleDirectoryServiceFactory

  • All Implemented Interfaces:
    org.apache.directory.server.core.factory.DirectoryServiceFactory

    public final class SimpleDirectoryServiceFactory
    extends Object
    implements org.apache.directory.server.core.factory.DirectoryServiceFactory
    An implementation of DirectoryServiceFactory which doesn't suffer from DIRSERVER-1504, where the schema LDIF files can fail to be extracted when the java.class.path system property is not set to a meaningful value.

    It is basically a simplified version of DefaultDirectoryServiceFactory, with a bunch of unnecessary configuration removed and custom handling for extracting schema files from the classpath to work around DIRSERVER-1504. The custom logic is the method extractSchemaResources(String), which uses Spring's resource utilities to load the LDIF files from the classpath reliably.

    • Constructor Detail

      • SimpleDirectoryServiceFactory

        public SimpleDirectoryServiceFactory()
    • Method Detail

      • init

        public void init​(String name)
                  throws Exception
        Specified by:
        init in interface org.apache.directory.server.core.factory.DirectoryServiceFactory
        Throws:
        Exception
      • getDirectoryService

        public org.apache.directory.server.core.api.DirectoryService getDirectoryService()
                                                                                  throws Exception
        Specified by:
        getDirectoryService in interface org.apache.directory.server.core.factory.DirectoryServiceFactory
        Throws:
        Exception
      • getPartitionFactory

        public org.apache.directory.server.core.factory.PartitionFactory getPartitionFactory()
                                                                                      throws Exception
        Specified by:
        getPartitionFactory in interface org.apache.directory.server.core.factory.DirectoryServiceFactory
        Throws:
        Exception