directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r891318 - /directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/schema/DefaultSchemaManager.java
Date Wed, 16 Dec 2009 17:05:40 GMT
Author: elecharny
Date: Wed Dec 16 17:05:39 2009
New Revision: 891318

URL: http://svn.apache.org/viewvc?rev=891318&view=rev
Log:
Fixed the disabled schema loading 

Modified:
    directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/schema/DefaultSchemaManager.java

Modified: directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/schema/DefaultSchemaManager.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/schema/DefaultSchemaManager.java?rev=891318&r1=891317&r2=891318&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/schema/DefaultSchemaManager.java
(original)
+++ directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/schema/DefaultSchemaManager.java
Wed Dec 16 17:05:39 2009
@@ -898,8 +898,28 @@
             load( clonedRegistries, schema );
         }
 
-        // Swap the registries if it is consistent
-        return swapRegistries( clonedRegistries );
+        clonedRegistries.clear();
+
+        // Apply the change to the correct registries if no errors
+        if ( errors.size() == 0 )
+        {
+            // No error, we can enable the schema in the real registries
+            for ( Schema schema : schemas )
+            {
+                load( registries, schema );
+            }
+            
+            return true;
+        }
+        else
+        {
+            for ( Schema schema : schemas )
+            {
+                schema.disable();
+            }
+            
+            return false;
+        }
     }
 
 



Mime
View raw message