directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r750740 - /directory/apacheds/branches/apacheds-replication/mitosis/src/main/java/org/apache/directory/mitosis/syncrepl/SyncreplConsumer.java
Date Fri, 06 Mar 2009 01:33:24 GMT
Author: elecharny
Date: Fri Mar  6 01:33:23 2009
New Revision: 750740

URL: http://svn.apache.org/viewvc?rev=750740&view=rev
Log:
Fixed some compilation errors so that Kiran can work tomorrow...

Modified:
    directory/apacheds/branches/apacheds-replication/mitosis/src/main/java/org/apache/directory/mitosis/syncrepl/SyncreplConsumer.java

Modified: directory/apacheds/branches/apacheds-replication/mitosis/src/main/java/org/apache/directory/mitosis/syncrepl/SyncreplConsumer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-replication/mitosis/src/main/java/org/apache/directory/mitosis/syncrepl/SyncreplConsumer.java?rev=750740&r1=750739&r2=750740&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-replication/mitosis/src/main/java/org/apache/directory/mitosis/syncrepl/SyncreplConsumer.java
(original)
+++ directory/apacheds/branches/apacheds-replication/mitosis/src/main/java/org/apache/directory/mitosis/syncrepl/SyncreplConsumer.java
Fri Mar  6 01:33:23 2009
@@ -29,7 +29,6 @@
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.entry.DefaultServerEntry;
 import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
 import org.apache.directory.server.ldap.LdapService;
 import org.apache.directory.server.ldap.handlers.extended.StartTlsHandler;
@@ -416,50 +415,10 @@
 	            
 	            try
 	            {
-	            	System.out.println( "========================================================
Pass #" + pass + "==========" 
-);
+	            	System.out.println( "========================================================
Pass #" + pass + "==========" );
 	            	pass++;
 	                System.out.println( "searching with searchRequest..." );
-	                Object[] result = connection.search( searchRequest );
-	                
-	                SearchResultDone searchDone = ( SearchResultDone ) result[1];
-	                
-	                SyncDoneValueControlCodec syncDoneCtrl = ( SyncDoneValueControlCodec ) searchDone
-	                .getCurrentControl().getControlValue();
-	                syncCookie = syncDoneCtrl.getCookie();
-	                System.out.println( "Cookie : " + StringTools.utf8ToString( syncCookie )
);
-	                LOG.info( "synccookie {}", StringTools.utf8ToString( syncCookie ) );
-	                
-	                List<SearchResultEntry> syncResList = ( List<SearchResultEntry>
) result[0];
-	                
-	                if ( syncResList != null )
-	                {
-	                    System.out.println( "sync state results..." + syncResList.size() );
-	                    for ( SearchResultEntry entry : syncResList )
-	                    {
-	                        Entry clientEntry = entry.getEntry();
-	                        SyncStateValueControlCodec syncStateCtrl = ( SyncStateValueControlCodec
) entry
-	                        .getCurrentControl().getControlValue();
-	                        
-	                        SyncStateTypeEnum state = syncStateCtrl.getSyncStateType();
-	                        
-	                        System.out.println( ">>>==================" + state.name()
+ ": " + clientEntry.getDn() );
-	                        
-	                        if ( state == SyncStateTypeEnum.ADD )
-	                        {
-	                            directoryService.getAdminSession().add(
-	                                new DefaultServerEntry( directoryService.getRegistries(),
clientEntry ) );
-	                        }
-	                        else if ( state == SyncStateTypeEnum.DELETE )
-	                        {
-	                            directoryService.getAdminSession().delete( clientEntry.getDn()
);
-	                        }
-	                        else if ( state == SyncStateTypeEnum.MODIFY )
-	                        {
-	                            LOG.error( "FIXME yet to implement modification" );
-	                        }
-	                    }
-	                }
+	                connection.search( searchRequest );
 	                
 	                
 	                LOG.info( "--------------------- Sleep for a little while ------------------"
);
@@ -555,9 +514,15 @@
         SyncreplConfiguration config = new SyncreplConfiguration();
         config.setProviderHost( "localhost" );
         config.setPort( 389 );
-        config.setBindDn( "cn=admin,dc=nodomain" );
+        
+        config.setBindDn( "cn=Manager,dc=my-domain,dc=com" );
+        // ELE config : config.setBindDn( "cn=admin,dc=nodomain" );
+        
         config.setCredentials( "secret" );
-        config.setBaseDn( "dc=test,dc=nodomain" );
+        
+        config.setBaseDn( "dc=my-domain,dc=com" );
+        // ELE config : config.setBaseDn( "dc=test,dc=nodomain" );
+        
         config.setFilter( "(objectclass=*)" );
         config.setSearchScope( SearchScope.SUBTREE.getJndiScope() );
 



Mime
View raw message