directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1022504 - /directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
Date Thu, 14 Oct 2010 13:00:01 GMT
Author: kayyagari
Date: Thu Oct 14 13:00:01 2010
New Revision: 1022504

URL: http://svn.apache.org/viewvc?rev=1022504&view=rev
Log:
o use a temporary schemamanager variable till the schema loading gets completed
  (it fixes the problem with loading schema while using a loader like NetworkSchemaLoader
which uses the same connection to load schema)

Modified:
    directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java

Modified: directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java?rev=1022504&r1=1022503&r2=1022504&view=diff
==============================================================================
--- directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
(original)
+++ directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
Thu Oct 14 13:00:01 2010
@@ -3150,23 +3150,25 @@ public class LdapNetworkConnection exten
     {
         try
         {
-            schemaManager = new DefaultSchemaManager( loader );
+            SchemaManager tmp = new DefaultSchemaManager( loader );
 
             // we enable all the schemas so that need not check with server for enabled schemas
-            Collection<Schema> schemas = schemaManager.getLoader().getAllSchemas();
+            Collection<Schema> schemas = tmp.getLoader().getAllSchemas();
             for ( Schema s : schemas )
             {
-                s.enable();
+                //s.enable();
             }
 
-            schemaManager.loadAllEnabled();
+            tmp.loadAllEnabled();
 
-            if ( !schemaManager.getErrors().isEmpty() )
+            if ( !tmp.getErrors().isEmpty() )
             {
                 String msg = "there are errors while loading the schema";
                 LOG.error( msg + " {}", schemaManager.getErrors() );
                 throw new LdapException( msg );
             }
+            
+            schemaManager = tmp;
         }
         catch ( LdapException le )
         {



Mime
View raw message