directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r933992 - in /directory/apacheds/trunk/syncrepl/src/main/java/org/apache/directory/server/syncrepl: SyncReplConsumer.java SyncreplRunnerUI.java
Date Wed, 14 Apr 2010 15:45:02 GMT
Author: kayyagari
Date: Wed Apr 14 15:45:01 2010
New Revision: 933992

URL: http://svn.apache.org/viewvc?rev=933992&view=rev
Log:
o added the 'ref' opeartional attribute to the set of returning attributes
o added ManageDsaITControl to the search request
o removed the useless syncrequestvalue variable

Modified:
    directory/apacheds/trunk/syncrepl/src/main/java/org/apache/directory/server/syncrepl/SyncReplConsumer.java
    directory/apacheds/trunk/syncrepl/src/main/java/org/apache/directory/server/syncrepl/SyncreplRunnerUI.java

Modified: directory/apacheds/trunk/syncrepl/src/main/java/org/apache/directory/server/syncrepl/SyncReplConsumer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/syncrepl/src/main/java/org/apache/directory/server/syncrepl/SyncReplConsumer.java?rev=933992&r1=933991&r2=933992&view=diff
==============================================================================
--- directory/apacheds/trunk/syncrepl/src/main/java/org/apache/directory/server/syncrepl/SyncReplConsumer.java
(original)
+++ directory/apacheds/trunk/syncrepl/src/main/java/org/apache/directory/server/syncrepl/SyncReplConsumer.java
Wed Apr 14 15:45:01 2010
@@ -43,6 +43,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
+import org.apache.directory.shared.ldap.codec.controls.ManageDsaITControl;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncDoneValue.SyncDoneValueControl;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncDoneValue.SyncDoneValueControlDecoder;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncInfoValue.SyncInfoValueControl;
@@ -100,9 +101,6 @@ public class SyncReplConsumer
     /** the search request with control */
     private SearchRequest searchRequest;
 
-    /** the syncrequest control */
-    private SyncRequestValueControl syncReq;
-
     /** a reference to the directoryService */
     private DirectoryService directoryService;
 
@@ -237,19 +235,9 @@ public class SyncReplConsumer
         searchRequest.setTypesOnly( false );
 
         searchRequest.addAttributes( config.getAttributes() );
-
-        syncReq = new SyncRequestValueControl();
-
-        if ( config.isRefreshPersist() )
-        {
-            syncReq.setMode( SynchronizationModeEnum.REFRESH_AND_PERSIST );
-        }
-        else
-        {
-            syncReq.setMode( SynchronizationModeEnum.REFRESH_ONLY );
-        }
-
-        syncReq.setReloadHint( false );
+        
+        // to treat the referrals as normal entries
+        searchRequest.add( new ManageDsaITControl() );
     }
 
 
@@ -304,7 +292,8 @@ public class SyncReplConsumer
 
     public void handleSearchReference( SearchResultReference searchRef )
     {
-        LOG.error( "!!!!!!!!!!!!!!!!! TODO handle SearchReference messages !!!!!!!!!!!!!!!!"
);
+        // this method won't be called cause the provider will server the referrals as
+        // normal entry objects due to the usage of ManageDsaITControl in the search request
     }
 
 

Modified: directory/apacheds/trunk/syncrepl/src/main/java/org/apache/directory/server/syncrepl/SyncreplRunnerUI.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/syncrepl/src/main/java/org/apache/directory/server/syncrepl/SyncreplRunnerUI.java?rev=933992&r1=933991&r2=933992&view=diff
==============================================================================
--- directory/apacheds/trunk/syncrepl/src/main/java/org/apache/directory/server/syncrepl/SyncreplRunnerUI.java
(original)
+++ directory/apacheds/trunk/syncrepl/src/main/java/org/apache/directory/server/syncrepl/SyncreplRunnerUI.java
Wed Apr 14 15:45:01 2010
@@ -115,7 +115,7 @@ public class SyncreplRunnerUI implements
         config.setCredentials( provServerPwd );
         config.setBaseDn( "dc=example,dc=com" );
         config.setFilter( "(objectclass=*)" );
-        config.setAttributes( "*,entryUUID,entryCSN" );
+        config.setAttributes( "*,ref,entryUUID,entryCSN" );
         config.setSearchScope( SearchScope.SUBTREE.getScope() );
         config.setReplicaId( 1 );
         config.setRefreshPersist( true );



Mime
View raw message