directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r943894 - /directory/apacheds/trunk/default-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
Date Thu, 13 May 2010 14:14:15 GMT
Author: kayyagari
Date: Thu May 13 14:14:14 2010
New Revision: 943894

URL: http://svn.apache.org/viewvc?rev=943894&view=rev
Log:
fixed an issue with reading the provider configurations from config partition

Modified:
    directory/apacheds/trunk/default-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java

Modified: directory/apacheds/trunk/default-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/default-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java?rev=943894&r1=943893&r2=943894&view=diff
==============================================================================
--- directory/apacheds/trunk/default-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
(original)
+++ directory/apacheds/trunk/default-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
Thu May 13 14:14:14 2010
@@ -199,7 +199,7 @@ public class ConfigPartitionReader
             String fqcn = replProvImplAttr.getString();
             try
             {
-                Class replProvImplClz = Class.forName( fqcn );
+                Class<?> replProvImplClz = Class.forName( fqcn );
                 ReplicationProvider rp = ( ReplicationProvider ) replProvImplClz.newInstance();
                 server.setReplicationProvider( rp );
             }
@@ -210,6 +210,8 @@ public class ConfigPartitionReader
             }
         }
         
+        server.setReplProviderConfigs( getReplProviderConfigs() );
+        
         return server;
     }
 
@@ -784,11 +786,13 @@ public class ConfigPartitionReader
     }
 
 
-    public List<SyncreplConfiguration> getReplicationConfigs() throws Exception
+    private List<SyncreplConfiguration> getReplProviderConfigs() throws Exception
     {
-        PresenceNode filter = new PresenceNode( ConfigSchemaConstants.ADS_REPL_PROVIDER_OC
);
+        EqualityNode<String> filter = new EqualityNode<String>( SchemaConstants.OBJECT_CLASS_AT,
new StringValue(
+            ConfigSchemaConstants.ADS_REPL_PROVIDER_OC ) );
+
         SearchControls controls = new SearchControls();
-        controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
+        controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
 
         IndexCursor<Long, Entry, Long> cursor = se.cursor( configPartition.getSuffixDn(),
             AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls );
@@ -800,7 +804,7 @@ public class ConfigPartitionReader
             return syncReplConfigLst;
         }
      
-        while( cursor.next() )
+        do
         {
             ForwardIndexEntry<Long, Entry, Long> forwardEntry = ( ForwardIndexEntry<Long,
Entry, Long> ) cursor.get();
         
@@ -904,7 +908,8 @@ public class ConfigPartitionReader
             
             syncReplConfigLst.add( config );
         }
-     
+        while( cursor.next() );
+        
         cursor.close();
         
         return syncReplConfigLst;



Mime
View raw message