directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r883301 - in /directory/apacheds/branches/apacheds-schema: core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java core-integ/src/main/java/org/apache/directory/server/core/integ/DirectoryServiceFactory.java
Date Mon, 23 Nov 2009 10:41:10 GMT
Author: elecharny
Date: Mon Nov 23 10:41:09 2009
New Revision: 883301

URL: http://svn.apache.org/viewvc?rev=883301&view=rev
Log:
Don't load the schema in the SchemaPartition, it's already loaded at this point

Modified:
    directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/main/java/org/apache/directory/server/core/integ/DirectoryServiceFactory.java

Modified: directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java?rev=883301&r1=883300&r2=883301&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
Mon Nov 23 10:41:09 2009
@@ -58,7 +58,6 @@
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.schema.SchemaUtils;
 import org.apache.directory.shared.ldap.util.DateUtils;
-import org.apache.directory.shared.ldap.util.ExceptionUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -245,16 +244,6 @@
             throw new RuntimeException( e );
         }
 
-        // Load the registries. We use a permissive registries at this point
-        // so even if the schema are not ordered or the SchemaObjects are not
-        // ordered in the schemas, we can still load them all.
-        boolean loaded = schemaManager.loadAllEnabled();
-
-        if ( !loaded )
-        {
-            throw new RuntimeException( "Schema load failed : " + ExceptionUtils.printErrors(
schemaManager.getErrors() ) );
-        }
-        
         schemaModificationDN = new LdapDN( ServerDNConstants.SCHEMA_MODIFICATIONS_DN );
         schemaModificationDN.normalize( schemaManager.getNormalizerMapping() );
     }

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/main/java/org/apache/directory/server/core/integ/DirectoryServiceFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/main/java/org/apache/directory/server/core/integ/DirectoryServiceFactory.java?rev=883301&r1=883300&r2=883301&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/main/java/org/apache/directory/server/core/integ/DirectoryServiceFactory.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/main/java/org/apache/directory/server/core/integ/DirectoryServiceFactory.java
Mon Nov 23 10:41:09 2009
@@ -91,6 +91,9 @@
             SchemaManager schemaManager = new DefaultSchemaManager( loader );
             service.setSchemaManager( schemaManager );
             
+            // We have to load the schema now, otherwise we won't be able
+            // to initialize the Partitions, as we won't be able to parse 
+            // and normalize their suffix DN
             boolean loaded = schemaManager.loadAllEnabled();
             schemaPartition.setSchemaManager( schemaManager );
             



Mime
View raw message