You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2023/05/01 06:16:30 UTC

[directory-server] 06/09: Set the DnFactory in the Directory service

This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/directory-server.git

commit 7ab388a168c07f6b5ee724aa4ddf2c1a0a2b58a8
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Mon May 1 08:13:55 2023 +0200

    Set the DnFactory in the Directory service
---
 .../apache/directory/server/core/factory/DSAnnotationProcessor.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java b/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java
index 921de1d477..08da3ad49f 100644
--- a/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java
+++ b/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java
@@ -33,6 +33,7 @@ import org.apache.directory.api.ldap.model.exception.LdapException;
 import org.apache.directory.api.ldap.model.exception.LdapUnwillingToPerformException;
 import org.apache.directory.api.ldap.model.ldif.LdifEntry;
 import org.apache.directory.api.ldap.model.ldif.LdifReader;
+import org.apache.directory.api.ldap.model.name.DefaultDnFactory;
 import org.apache.directory.api.ldap.model.name.Dn;
 import org.apache.directory.api.ldap.model.schema.SchemaManager;
 import org.apache.directory.api.util.Network;
@@ -289,7 +290,7 @@ public final class DSAnnotationProcessor
                     }
                 }
             }
-
+            
             partition.setSchemaManager( schemaManager );
 
             // Inject the partition into the DirectoryService
@@ -304,6 +305,9 @@ public final class DSAnnotationProcessor
             }
         }
 
+        // Inject the DnFactory in the DLAP codec service
+        service.getLdapCodecService().setDnfactory( new DefaultDnFactory( service.getSchemaManager(), 1000 ) );
+
         return service;
     }