directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1158385 - in /directory/apacheds/trunk: protocol-ldap/src/main/java/org/apache/directory/server/ldap/ protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ protocol-ldap/src/main/java/org/apache/directory/server/ldap/repli...
Date Tue, 16 Aug 2011 17:23:05 GMT
Author: elecharny
Date: Tue Aug 16 17:23:04 2011
New Revision: 1158385

URL: http://svn.apache.org/viewvc?rev=1158385&view=rev
Log:
o Added two packages for the replication subsystem, provider and consumer, and moved the associated classes to those packages (it helps to understand what class is used on which side)
o Added a dedicated Provider logger

Added:
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumer.java
      - copied, changed from r1158110, directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicationConsumer.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/SyncReplConsumer.java
      - copied, changed from r1158110, directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplConsumerManager.java
      - copied, changed from r1158110, directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplConsumerManager.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplicaEventLog.java
      - copied, changed from r1158110, directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventLog.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplicaJournalCursor.java
      - copied, changed from r1158110, directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaJournalCursor.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplicationRequestHandler.java
      - copied, changed from r1158110, directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicationRequestHandler.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplRequestHandler.java
      - copied, changed from r1158110, directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplRequestHandler.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplSearchListener.java
      - copied, changed from r1158110, directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplSearchListener.java
Removed:
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplConsumerManager.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventLog.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaJournalCursor.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicationConsumer.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicationRequestHandler.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplRequestHandler.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplSearchListener.java
Modified:
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
    directory/apacheds/trunk/server-annotations/src/main/java/org/apache/directory/server/factory/ServerAnnotationProcessor.java
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientInitialRefreshIT.java
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/MockSyncReplConsumer.java
    directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/ServiceBuilder.java

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java?rev=1158385&r1=1158384&r2=1158385&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java Tue Aug 16 17:23:04 2011
@@ -53,8 +53,8 @@ import org.apache.directory.server.ldap.
 import org.apache.directory.server.ldap.handlers.bind.MechanismHandler;
 import org.apache.directory.server.ldap.handlers.extended.StartTlsHandler;
 import org.apache.directory.server.ldap.handlers.ssl.LdapsInitializer;
-import org.apache.directory.server.ldap.replication.ReplicationConsumer;
-import org.apache.directory.server.ldap.replication.ReplicationRequestHandler;
+import org.apache.directory.server.ldap.replication.consumer.ReplicationConsumer;
+import org.apache.directory.server.ldap.replication.provider.ReplicationRequestHandler;
 import org.apache.directory.server.protocol.shared.DirectoryBackedService;
 import org.apache.directory.server.protocol.shared.transport.TcpTransport;
 import org.apache.directory.server.protocol.shared.transport.Transport;

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java?rev=1158385&r1=1158384&r2=1158385&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java Tue Aug 16 17:23:04 2011
@@ -37,7 +37,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.ldap.LdapSession;
 import org.apache.directory.server.ldap.handlers.controls.PagedSearchContext;
-import org.apache.directory.server.ldap.replication.ReplicationRequestHandler;
+import org.apache.directory.server.ldap.replication.provider.ReplicationRequestHandler;
 import org.apache.directory.shared.ldap.codec.controls.search.pagedSearch.PagedResultsDecorator;
 import org.apache.directory.shared.ldap.extras.controls.SyncRequestValue;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;

Copied: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumer.java (from r1158110, directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicationConsumer.java)
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumer.java?p2=directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumer.java&p1=directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicationConsumer.java&r1=1158110&r2=1158385&rev=1158385&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicationConsumer.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumer.java Tue Aug 16 17:23:04 2011
@@ -18,10 +18,11 @@
  *
  */
 
-package org.apache.directory.server.ldap.replication;
+package org.apache.directory.server.ldap.replication.consumer;
 
 
 import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.ldap.replication.ReplicationConsumerConfig;
 
 
 /**

Copied: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/SyncReplConsumer.java (from r1158110, directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java)
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/SyncReplConsumer.java?p2=directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/SyncReplConsumer.java&p1=directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java&r1=1158110&r2=1158385&rev=1158385&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/SyncReplConsumer.java Tue Aug 16 17:23:04 2011
@@ -17,7 +17,7 @@
  *  under the License.
  *
  */
-package org.apache.directory.server.ldap.replication;
+package org.apache.directory.server.ldap.replication.consumer;
 
 
 import java.io.File;
@@ -38,6 +38,8 @@ import org.apache.directory.ldap.client.
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
+import org.apache.directory.server.ldap.replication.ReplicationConsumerConfig;
+import org.apache.directory.server.ldap.replication.SyncreplConfiguration;
 import org.apache.directory.shared.ldap.codec.controls.manageDsaIT.ManageDsaITDecorator;
 import org.apache.directory.shared.ldap.extras.controls.SyncDoneValue;
 import org.apache.directory.shared.ldap.extras.controls.SyncInfoValue;

Copied: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplConsumerManager.java (from r1158110, directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplConsumerManager.java)
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplConsumerManager.java?p2=directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplConsumerManager.java&p1=directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplConsumerManager.java&r1=1158110&r2=1158385&rev=1158385&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplConsumerManager.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplConsumerManager.java Tue Aug 16 17:23:04 2011
@@ -18,7 +18,7 @@
  *
  */
 
-package org.apache.directory.server.ldap.replication;
+package org.apache.directory.server.ldap.replication.provider;
 
 
 import java.util.ArrayList;
@@ -65,6 +65,9 @@ public class ReplConsumerManager
 {
     /** Logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( ReplConsumerManager.class );
+    
+    /** A logger for the replication provider */
+    private static final Logger PROVIDER_LOG = LoggerFactory.getLogger( "PROVIDER_LOG" );
 
     /** The admin session used to commuicate with the backend */
     private CoreSession adminSession;
@@ -107,6 +110,7 @@ public class ReplConsumerManager
         OBJECT_CLASS_AT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.OBJECT_CLASS_AT );
         ADS_REPL_LAST_SENT_CSN_AT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.ADS_REPL_LAST_SENT_CSN );
         
+        PROVIDER_LOG.debug( "Starting the replication consumer manager" );
         createConsumersBranch();
     }
 
@@ -119,7 +123,8 @@ public class ReplConsumerManager
         if ( !adminSession.exists( REPL_CONSUMER_DN ) )
         {
             LOG.debug( "creating the entry for storing replication consumers' details" );
-            
+            PROVIDER_LOG.debug( "Creating the entry for storing replication consumers' details in {}", REPL_CONSUMER_DN );
+
             Entry entry = new DefaultEntry( schemaManager , REPL_CONSUMER_DN,
                 SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.ORGANIZATIONAL_UNIT_OC,
                 SchemaConstants.OU_AT, CONSUMERS );
@@ -143,6 +148,8 @@ public class ReplConsumerManager
             return;
         }
         
+        PROVIDER_LOG.debug( "Adding a consumer for replica {}", replica.toString() );
+
         // Check that we don't already have an entry for this consumer
         Dn consumerDn = directoryService.getDnFactory().create( SchemaConstants.ADS_DS_REPLICA_ID + "=" + replica.getId() + "," + REPL_CONSUMER_DN );
         
@@ -151,6 +158,7 @@ public class ReplConsumerManager
             // Error...
             String message = "The replica " + consumerDn.getName() + " already exists";
             LOG.error( message );
+            PROVIDER_LOG.debug( message );
             throw new LdapEntryAlreadyExistsException( message );
         }
 
@@ -190,11 +198,14 @@ public class ReplConsumerManager
         // Check that we have an entry for this consumer
         Dn consumerDn = directoryService.getDnFactory().create( SchemaConstants.ADS_DS_REPLICA_ID + "=" + replica.getId() + "," + REPL_CONSUMER_DN );
         
+        PROVIDER_LOG.debug( "Deleting the {} consumer", consumerDn );
+
         if ( !adminSession.exists( consumerDn ) )
         {
             // Error...
             String message = "The replica " + consumerDn.getName() + " does not exist";
             LOG.error( message );
+            PROVIDER_LOG.debug( message );
             throw new LdapEntryAlreadyExistsException( message );
         }
 
@@ -235,6 +246,7 @@ public class ReplConsumerManager
         adminSession.modify( dn, mod );
         
         LOG.debug( "updated last sent CSN of consumer entry {}", dn );
+        PROVIDER_LOG.debug( "updated the LastSentCSN of consumer entry {}", dn );
     }
 
 

Copied: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplicaEventLog.java (from r1158110, directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventLog.java)
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplicaEventLog.java?p2=directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplicaEventLog.java&p1=directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventLog.java&r1=1158110&r2=1158385&rev=1158385&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventLog.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplicaEventLog.java Tue Aug 16 17:23:04 2011
@@ -18,7 +18,7 @@
  *
  */
 
-package org.apache.directory.server.ldap.replication;
+package org.apache.directory.server.ldap.replication.provider;
 
 
 import java.io.File;
@@ -32,9 +32,9 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.event.NotificationCriteria;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmTable;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.StringSerializer;
+import org.apache.directory.server.ldap.replication.ReplicaEventMessage;
+import org.apache.directory.server.ldap.replication.ReplicaEventMessageSerializer;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.model.cursor.Cursor;
-import org.apache.directory.shared.ldap.model.cursor.Tuple;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
 import org.apache.directory.shared.ldap.model.schema.comparators.SerializableComparator;
 import org.slf4j.Logger;
@@ -62,6 +62,9 @@ public class ReplicaEventLog implements 
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( ReplicaEventLog.class );
     
+    /** A logger for the replication provider */
+    private static final Logger PROVIDER_LOG = LoggerFactory.getLogger( "PROVIDER_LOG" );
+
     /** IP address of the syncrepl consumer */
     private String hostName;
 
@@ -103,6 +106,7 @@ public class ReplicaEventLog implements 
      */
     public ReplicaEventLog( DirectoryService directoryService, int replicaId ) throws IOException
     {
+        PROVIDER_LOG.debug( "Creating the replication queue for replica {}", replicaId );
         SchemaManager schemaManager = directoryService.getSchemaManager();
         this.replicaId = replicaId;
         this.searchCriteria = new NotificationCriteria();
@@ -131,15 +135,16 @@ public class ReplicaEventLog implements 
         try
         {
             LOG.debug( "logging entry with Dn {} with the event {}", message.getEntry().getDn(), message.getChangeType() );
+            PROVIDER_LOG.debug( "logging entry with Dn {} with the event {}", message.getEntry().getDn(), message.getChangeType() );
 
             String entryCsn = message.getEntry().get( SchemaConstants.ENTRY_CSN_AT ).getString();
             journal.put( entryCsn, message );
             journal.sync();
-            recman.commit();
         }
         catch ( Exception e )
         {
             LOG.warn( "Failed to insert the entry into syncrepl log", e );
+            PROVIDER_LOG.error( "Failed to insert the entry into syncrepl log", e );
         }
     }
 
@@ -172,6 +177,8 @@ public class ReplicaEventLog implements 
      */
     public void stop() throws Exception
     {
+        PROVIDER_LOG.debug( "Stopping the EventLog for replicaId {}", replicaId );
+        
         // Close the producer and session, DO NOT close connection 
         if ( journal != null )
         {

Copied: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplicaJournalCursor.java (from r1158110, directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaJournalCursor.java)
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplicaJournalCursor.java?p2=directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplicaJournalCursor.java&p1=directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaJournalCursor.java&r1=1158110&r2=1158385&rev=1158385&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaJournalCursor.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplicaJournalCursor.java Tue Aug 16 17:23:04 2011
@@ -18,11 +18,12 @@
  *
  */
 
-package org.apache.directory.server.ldap.replication;
+package org.apache.directory.server.ldap.replication.provider;
 
 import java.util.Iterator;
 
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmTable;
+import org.apache.directory.server.ldap.replication.ReplicaEventMessage;
 import org.apache.directory.shared.ldap.model.cursor.AbstractCursor;
 import org.apache.directory.shared.ldap.model.cursor.Cursor;
 import org.apache.directory.shared.ldap.model.cursor.Tuple;
@@ -31,7 +32,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Define a cursor on top of a message queue.
+ * Define a cursor on top of a replication journal.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
@@ -61,7 +62,7 @@ public class ReplicaJournalCursor extend
     {
         this.journal = journal;
         this.tupleCursor = journal.cursor();
-        this.consumerCsn = consumerCsn;        
+        this.consumerCsn = consumerCsn;
     }
 
 
@@ -140,7 +141,7 @@ public class ReplicaJournalCursor extend
         
         LOG.debug( "ReplicaEventMessage: {}", qualifiedEvtMsg );
         
-        if( qualifiedEvtMsg.isEventOlderThan( consumerCsn ) )
+        if ( qualifiedEvtMsg.isEventOlderThan( consumerCsn ) )
         {
             if( LOG.isDebugEnabled() )
             {

Copied: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplicationRequestHandler.java (from r1158110, directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicationRequestHandler.java)
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplicationRequestHandler.java?p2=directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplicationRequestHandler.java&p1=directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicationRequestHandler.java&r1=1158110&r2=1158385&rev=1158385&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicationRequestHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplicationRequestHandler.java Tue Aug 16 17:23:04 2011
@@ -18,7 +18,7 @@
  *
  */
 
-package org.apache.directory.server.ldap.replication;
+package org.apache.directory.server.ldap.replication.provider;
 
 import org.apache.directory.server.ldap.LdapServer;
 import org.apache.directory.server.ldap.LdapSession;

Copied: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplRequestHandler.java (from r1158110, directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplRequestHandler.java)
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplRequestHandler.java?p2=directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplRequestHandler.java&p1=directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplRequestHandler.java&r1=1158110&r2=1158385&rev=1158385&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplRequestHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplRequestHandler.java Tue Aug 16 17:23:04 2011
@@ -18,7 +18,7 @@
  *
  */
 
-package org.apache.directory.server.ldap.replication;
+package org.apache.directory.server.ldap.replication.provider;
 
 
 import static java.lang.Math.min;
@@ -42,6 +42,7 @@ import org.apache.directory.server.ldap.
 import org.apache.directory.server.ldap.LdapSession;
 import org.apache.directory.server.ldap.handlers.SearchAbandonListener;
 import org.apache.directory.server.ldap.handlers.SearchTimeLimitingMonitor;
+import org.apache.directory.server.ldap.replication.ReplicaEventMessage;
 import org.apache.directory.shared.ldap.extras.controls.SyncDoneValue;
 import org.apache.directory.shared.ldap.extras.controls.SyncInfoValue;
 import org.apache.directory.shared.ldap.extras.controls.SyncModifyDn;
@@ -54,8 +55,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncStateValueDecorator;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.csn.Csn;
-import org.apache.directory.shared.ldap.model.cursor.Cursor;
-import org.apache.directory.shared.ldap.model.cursor.Tuple;
 import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.entry.StringValue;
@@ -92,7 +91,7 @@ import org.slf4j.LoggerFactory;
 
 
 /**
- * NOTE: doco is missing at many parts. Will be added once the functionality is satisfactory
+ * Class used to process the incoming synchronization request from the consumers.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
@@ -102,6 +101,10 @@ public class SyncReplRequestHandler impl
     /** The logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( SyncReplRequestHandler.class );
 
+    /** A logger for the replication provider */
+    private static final Logger PROVIDER_LOG = LoggerFactory.getLogger( "PROVIDER_LOG" );
+
+    /** A delimiter for the replicaId */
     public static final String REPLICA_ID_DELIM = ";";
 
     /** Tells if the replication handler is already started */
@@ -141,12 +144,14 @@ public class SyncReplRequestHandler impl
         if ( initialized )
         {
             LOG.warn( "syncrepl provider was already initialized" );
+            PROVIDER_LOG.warn( "syncrepl provider was already initialized" );
             return;
         }
         
         try
         {
             LOG.info( "initializing the syncrepl provider" );
+            PROVIDER_LOG.debug( "initializing the syncrepl provider" );
 
             this.ldapServer = server;
             this.dirService = server.getDirectoryService();
@@ -174,27 +179,34 @@ public class SyncReplRequestHandler impl
 
             initialized = true;
             LOG.info( "syncrepl provider initialized successfully" );
+            PROVIDER_LOG.debug( "syncrepl provider initialized successfully" );
         }
         catch ( Exception e )
         {
             LOG.error( "Failed to initialize the log files required by the syncrepl provider", e );
+            PROVIDER_LOG.error( "Failed to initialize the log files required by the syncrepl provider", e );
             throw new RuntimeException( e );
         }
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void stop()
     {
         for ( ReplicaEventLog log : replicaLogMap.values() )
         {
             try
             {
+                PROVIDER_LOG.debug( "Stopping the logging for replica ", log.getId() );
                 log.stop();
             }
             catch( Exception e )
             {
                 LOG.warn( "Failed to close the event log {}", log.getId() );
                 LOG.warn( "", e );
+                PROVIDER_LOG.error( "Failed to close the event log {}", log.getId(), e );
             }
         }
         
@@ -212,7 +224,6 @@ public class SyncReplRequestHandler impl
     {
         try
         {
-            //System.out.println( "Init replication on Provider" );
             // First extract the Sync control from the request
             SyncRequestValue syncControl = ( SyncRequestValue ) request.getControls().get(
                 SyncRequestValue.OID );
@@ -222,18 +233,21 @@ public class SyncReplRequestHandler impl
 
             if ( cookieBytes == null )
             {
-                // No cookie ? We have to get all the entries from the server
+                PROVIDER_LOG.debug( "Received a replication request {} with no cookie", request );
+                // No cookie ? We have to get all the entries from the provider
                 doInitialRefresh( session, request );
             }
             else
             {
                 String cookieString = Strings.utf8ToString(cookieBytes);
                 
-                LOG.warn( "search request received with the cookie {}", cookieString );
+                PROVIDER_LOG.debug( "Received a replication request {} with a cookie '{}'", request, cookieString );
+                LOG.debug( "search request received with the cookie {}", cookieString );
                 
                 if ( !isValidCookie( cookieString ) )
                 {
                     LOG.error( "received a invalid cookie {} from the consumer with session {}", cookieString, session );
+                    PROVIDER_LOG.debug( "received a invalid cookie {} from the consumer with session {}", cookieString, session );
                     sendESyncRefreshRequired( session, request );
                 }
                 else
@@ -244,11 +258,12 @@ public class SyncReplRequestHandler impl
                     {
                         LOG.warn( "received a valid cookie {} but there is no event log associated with this replica",
                             cookieString );
+                        PROVIDER_LOG.debug( "received a valid cookie {} but there is no event log associated with this replica",
+                            cookieString );
                         sendESyncRefreshRequired( session, request );
                     }
                     else
                     {
-                        //System.out.println( "  -> We have events" );
                         String consumerCsn = getCsn( cookieString );
                         doContentUpdate( session, request, clientMsgLog, consumerCsn );
                     }
@@ -258,6 +273,7 @@ public class SyncReplRequestHandler impl
         catch ( Exception e )
         {
             LOG.error( "Failed to handle the syncrepl request", e );
+            PROVIDER_LOG.error( "Failed to handle the syncrepl request", e );
 
             LdapException le = new LdapException( e.getMessage(), e );
             le.initCause( e );
@@ -267,6 +283,9 @@ public class SyncReplRequestHandler impl
     }
 
 
+    /**
+     * Send all the stored modifications to the consumer
+     */
     private String sendContentFromLog( LdapSession session, SearchRequest req, ReplicaEventLog clientMsgLog, String consumerCsn )
         throws Exception
     {
@@ -274,17 +293,16 @@ public class SyncReplRequestHandler impl
         String lastSentCsn = clientMsgLog.getLastSentCsn();
 
         ReplicaJournalCursor cursor = clientMsgLog.getCursor( consumerCsn );
-        //int i = 0;
         
+        PROVIDER_LOG.debug( "Processing the log for replica {}", clientMsgLog.getId() );
+
         while ( cursor.next() )
         {
             ReplicaEventMessage replicaEventMessage = cursor.get();
             Entry entry = replicaEventMessage.getEntry();
-            LOG.debug( "received message from the queue {}", entry );
-            //i++;
+            LOG.debug( "Read message from the queue {}", entry );
+            PROVIDER_LOG.debug( "Read message from the queue {}", entry );
             
-            //System.out.println( "/////////////-> Message(" + i + ") read from queue : " + message.getEventType() + "/" + entry.getDn() );
-
             lastSentCsn = entry.get( SchemaConstants.ENTRY_CSN_AT ).getString();
 
             ChangeType event = replicaEventMessage.getChangeType();
@@ -314,12 +332,17 @@ public class SyncReplRequestHandler impl
             }
         }
         
+        PROVIDER_LOG.debug( "All pending modifciations for replica {} processed", clientMsgLog.getId() );
         cursor.close();
 
         return lastSentCsn;
     }
 
 
+    /**
+     * process the update of the consumer, starting from the given LastEntryCSN the consumer 
+     * has sent with the sync request.
+     */
     private void doContentUpdate( LdapSession session, SearchRequest req, ReplicaEventLog replicaLog, String consumerCsn )
         throws Exception
     {
@@ -337,11 +360,11 @@ public class SyncReplRequestHandler impl
 
         String lastSentCsn = sendContentFromLog( session, req, replicaLog, consumerCsn );
 
+        PROVIDER_LOG.debug( "The latest entry sent to the consumer {} has this CSN : {}", replicaLog.getId(), lastSentCsn );
         byte[] cookie = Strings.getBytesUtf8(replicaLog.getId() + REPLICA_ID_DELIM + lastSentCsn);
 
         if ( refreshNPersist )
         {
-            //System.out.println( "   --> In doContenUpdate, RNP " );
             IntermediateResponse intermResp = new IntermediateResponseImpl( req.getMessageId() );
             intermResp.setResponseName( SyncInfoValue.OID );
 
@@ -351,13 +374,13 @@ public class SyncReplRequestHandler impl
             syncInfo.setCookie( cookie );
             intermResp.setResponseValue( syncInfo.getValue() );
 
+            PROVIDER_LOG.debug( "Sent the intermediate response to the {} consumer, {}", replicaLog.getId(), intermResp );
             session.getIoSession().write( intermResp );
 
             replicaLog.getPersistentListener().setPushInRealTime( refreshNPersist );
         }
         else
         {
-            //System.out.println( "   --> In doContenUpdate, RO " );
             SearchResultDone searchDoneResp = ( SearchResultDone ) req.getResultResponse();
             searchDoneResp.getLdapResult().setResultCode( ResultCodeEnum.SUCCESS );
             SyncDoneValue syncDone = new SyncDoneValueDecorator( 
@@ -365,6 +388,8 @@ public class SyncReplRequestHandler impl
             syncDone.setCookie( cookie );
             searchDoneResp.addControl( syncDone );
 
+            PROVIDER_LOG.debug( "Send a SearchResultDone response to the {} consumer", replicaLog.getId(), searchDoneResp );
+
             session.getIoSession().write( searchDoneResp );
         }
 
@@ -374,10 +399,6 @@ public class SyncReplRequestHandler impl
 
     /**
      * Process the initial refresh : we will send all the entries 
-     * 
-     * @param session The LDAP session to use
-     * @param request The serarch request to process
-     * @throws Exception
      */
     private void doInitialRefresh( LdapSession session, SearchRequest request ) throws Exception
     {
@@ -405,6 +426,7 @@ public class SyncReplRequestHandler impl
 
         // now we process entries forever as they change
         LOG.info( "starting persistent search for the client {}", replicaLog );
+        PROVIDER_LOG.debug( "Starting persistent search for the client {}", replicaLog );
 
         // irrespective of the sync mode set the 'isRealtimePush' to false initially so that we can
         // store the modifications in the queue and later if it is a persist mode
@@ -453,6 +475,8 @@ public class SyncReplRequestHandler impl
                 syncInfo.setCookie( cookie );
                 intermResp.setResponseValue( syncInfo.getValue() );
 
+                PROVIDER_LOG.info( "Sending the intermediate response to consumer {}, {}", replicaLog, syncInfo );
+
                 session.getIoSession().write( intermResp );
 
                 // switch the handler mode to realtime push
@@ -465,6 +489,8 @@ public class SyncReplRequestHandler impl
                     ldapServer.getDirectoryService().getLdapCodecService() );
                 syncDone.setCookie( cookie );
                 searchDoneResp.addControl( syncDone );
+                PROVIDER_LOG.info( "Sending the searchResultDone response to consumer {}, {}", replicaLog, searchDoneResp );
+
                 session.getIoSession().write( searchDoneResp );
             }
         }
@@ -473,6 +499,8 @@ public class SyncReplRequestHandler impl
         {
             LOG.warn( "initial content refresh didn't succeed due to {}", searchDoneResp.getLdapResult()
                 .getResultCode() );
+            PROVIDER_LOG.warn( "initial content refresh didn't succeed due to {}", searchDoneResp.getLdapResult()
+                .getResultCode() );
             replicaLog.truncate();
             replicaLog = null;
 
@@ -482,7 +510,7 @@ public class SyncReplRequestHandler impl
             return;
         }
 
-        // if all is well then store the consumer infor
+        // if all is well then store the consumer information
         replicaUtil.addConsumerEntry(replicaLog );
 
         // add to the map only after storing in the DIT, else the Replica update thread barfs
@@ -490,6 +518,10 @@ public class SyncReplRequestHandler impl
     }
 
 
+    /**
+     * Process a search on the provider to get all the modified entries. We then send all
+     * of them to the consumer
+     */
     private SearchResultDone doSimpleSearch( LdapSession session, SearchRequest req ) throws Exception
     {
         SearchResultDone searchDoneResp = ( SearchResultDone ) req.getResultResponse();
@@ -557,6 +589,7 @@ public class SyncReplRequestHandler impl
             {
                 // The client has closed the connection
                 LOG.debug( "Request terminated for message {}, the client has closed the session", req.getMessageId() );
+                PROVIDER_LOG.debug( "Request terminated for message {}, the client has closed the session", req.getMessageId() );
                 break;
             }
 
@@ -564,6 +597,7 @@ public class SyncReplRequestHandler impl
             {
                 // The cursor has been closed by an abandon request.
                 LOG.debug( "Request terminated by an AbandonRequest for message {}", req.getMessageId() );
+                PROVIDER_LOG.debug( "Request terminated by an AbandonRequest for message {}", req.getMessageId() );
                 break;
             }
 
@@ -614,15 +648,19 @@ public class SyncReplRequestHandler impl
         Response resp = generateResponse( session, req, entry );
         resp.addControl( syncStateControl );
 
-        session.getIoSession().write( resp );
         LOG.debug( "Sending {}", entry.getDn() );
+        PROVIDER_LOG.debug( "Sending the entry:", entry.getDn() );
+        session.getIoSession().write( resp );
     }
 
 
+    /**
+     * Prepare and send a search result entry response, with the associated
+     * SyncState control for a MODDN operation.
+     */
     private void sendSearchResultEntry( LdapSession session, SearchRequest req, Entry entry,
         SyncModifyDn modDnControl ) throws Exception
     {
-
         Attribute uuid = entry.get( SchemaConstants.ENTRY_UUID_AT );
         SyncStateValueDecorator syncStateControl = new SyncStateValueDecorator(
             ldapServer.getDirectoryService().getLdapCodecService() );
@@ -633,11 +671,16 @@ public class SyncReplRequestHandler impl
         resp.addControl( syncStateControl );
         resp.addControl( modDnControl );
 
-        session.getIoSession().write( resp );
         LOG.debug( "Sending {}", entry.getDn() );
+        PROVIDER_LOG.debug( "Sending the MODDN modification:", entry.getDn() );
+
+        session.getIoSession().write( resp );
     }
 
 
+    /**
+     * Build the response to be sent to the client
+     */
     private Response generateResponse( LdapSession session, SearchRequest req, Entry entry ) throws Exception
     {
         Attribute ref = entry.get( SchemaConstants.REF_AT );
@@ -838,6 +881,10 @@ public class SyncReplRequestHandler impl
     }
 
 
+    /**
+     * Update the consumer configuration entries if they are 'dirty' (ie, if
+     * the consumer lastCSN is not up to date)
+     */
     private void storeReplicaInfo()
     {
         try
@@ -849,6 +896,7 @@ public class SyncReplRequestHandler impl
                 if ( replica.isDirty() )
                 {
                     LOG.debug( "updating the details of replica {}", replica );
+                    PROVIDER_LOG.debug( "updating the details of replica {}", replica );
                     replicaUtil.updateReplicaLastSentCsn( replica );
                     replica.setDirty( false );
                 }
@@ -857,10 +905,14 @@ public class SyncReplRequestHandler impl
         catch ( Exception e )
         {
             LOG.error( "Failed to store the replica information", e );
+            PROVIDER_LOG.error( "Failed to store the replica information", e );
         }
     }
 
 
+    /**
+     * Read and store the consumer's informations
+     */
     private void loadReplicaInfo()
     {
         try
@@ -872,6 +924,7 @@ public class SyncReplRequestHandler impl
                 for ( ReplicaEventLog replica : eventLogs )
                 {
                     LOG.debug( "initializing the replica log from {}", replica.getId() );
+                    PROVIDER_LOG.debug( "initializing the replica log from {}", replica.getId() );
                     replicaLogMap.put( replica.getId(), replica );
 
                     // update the replicaCount's value to assign a correct value to the new replica(s) 
@@ -884,15 +937,20 @@ public class SyncReplRequestHandler impl
             else
             {
                 LOG.debug( "no replica logs found to initialize" );
+                PROVIDER_LOG.debug( "no replica logs found to initialize" );
             }
         }
         catch ( Exception e )
         {
             LOG.error( "Failed to load the replica information", e );
+            PROVIDER_LOG.error( "Failed to load the replica information", e );
         }
     }
 
 
+    /**
+     * Register the listeners for each existing consumers
+     */
     private void registerPersistentSearches() throws Exception
     {
         for ( Map.Entry<Integer, ReplicaEventLog> e : replicaLogMap.entrySet() )
@@ -902,6 +960,7 @@ public class SyncReplRequestHandler impl
             if ( log.getSearchCriteria() != null )
             {
                 LOG.debug( "registering peristent search for the replica {}", log.getId() );
+                PROVIDER_LOG.debug( "registering peristent search for the replica {}", log.getId() );
                 SyncReplSearchListener handler = new SyncReplSearchListener( null, null, log, false );
                 log.setPersistentListener( handler );
 
@@ -911,11 +970,16 @@ public class SyncReplRequestHandler impl
             {
                 LOG.warn( "invalid peristent search criteria {} for the replica {}", log.getSearchCriteria(), log
                     .getId() );
+                PROVIDER_LOG.warn( "invalid peristent search criteria {} for the replica {}", log.getSearchCriteria(), log
+                    .getId() );
             }
         }
     }
 
 
+    /**
+     * Create a thread to process replication communication with a consumer
+     */
     private Runnable createConsumerInfoUpdateTask()
     {
         Runnable task = new Runnable()
@@ -933,6 +997,7 @@ public class SyncReplRequestHandler impl
                     catch ( InterruptedException e )
                     {
                         LOG.warn( "thread storing the replica information was interrupted", e );
+                        PROVIDER_LOG.warn( "thread storing the replica information was interrupted", e );
                     }
                 }
             }
@@ -942,20 +1007,28 @@ public class SyncReplRequestHandler impl
     }
 
 
+    /**
+     * Check the cookie syntax. A cookie must have the following syntax :
+     * <replicaId> [ ';' [ <CSN> ] ]
+     */
     private boolean isValidCookie( String cookieString )
     {
-        if ( cookieString == null || cookieString.trim().length() == 0 )
+        if ( ( cookieString == null ) || ( cookieString.trim().length() == 0 ) )
         {
             return false;
         }
 
         int pos = cookieString.indexOf( REPLICA_ID_DELIM );
-        if ( pos <= 0 ) // position should start from 1 or higher cause a cookie can be like "0;<csn>" or "11;<csn>"
+        
+        // position should start from 1 or higher cause a cookie can be
+        // like "0;<csn>" or "11;<csn>"
+        if ( pos <= 0 )  
         {
             return false;
         }
 
         String replicaId = cookieString.substring( 0, pos );
+        
         try
         {
             Integer.parseInt( replicaId );
@@ -973,7 +1046,7 @@ public class SyncReplRequestHandler impl
 
         String csnString = cookieString.substring( pos + 1 );
 
-        return Csn.isValid(csnString);
+        return Csn.isValid( csnString );
     }
 
     /**
@@ -1002,6 +1075,9 @@ public class SyncReplRequestHandler impl
     }
 
 
+    /**
+     * Get the Replica event log from the replica ID found in the cookie 
+     */
     private ReplicaEventLog getReplicaEventLog( String cookieString ) throws Exception
     {
         ReplicaEventLog replicaLog = null;
@@ -1016,6 +1092,9 @@ public class SyncReplRequestHandler impl
     }
 
 
+    /**
+     * Create a new ReplicaEventLog
+     */
     private ReplicaEventLog createRelicaEventLog( String hostName, String filter ) throws Exception
     {
         int replicaId = replicaCount.incrementAndGet();
@@ -1030,6 +1109,9 @@ public class SyncReplRequestHandler impl
     }
 
 
+    /**
+     * Send an error response to he consue r: it has to send a SYNC_REFRESH request first. 
+     */
     private void sendESyncRefreshRequired( LdapSession session, SearchRequest req ) throws Exception
     {
         SearchResultDone searchDoneResp = ( SearchResultDone ) req.getResultResponse();

Copied: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplSearchListener.java (from r1158110, directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplSearchListener.java)
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplSearchListener.java?p2=directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplSearchListener.java&p1=directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplSearchListener.java&r1=1158110&r2=1158385&rev=1158385&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplSearchListener.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplSearchListener.java Tue Aug 16 17:23:04 2011
@@ -17,7 +17,7 @@
  *  under the License. 
  *  
  */
-package org.apache.directory.server.ldap.replication;
+package org.apache.directory.server.ldap.replication.provider;
 
 
 import org.apache.directory.server.core.DirectoryService;
@@ -32,6 +32,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.ldap.LdapSession;
+import org.apache.directory.server.ldap.replication.ReplicaEventMessage;
 import org.apache.directory.shared.ldap.extras.controls.SyncModifyDn;
 import org.apache.directory.shared.ldap.extras.controls.SyncModifyDnType;
 import org.apache.directory.shared.ldap.extras.controls.SyncStateTypeEnum;

Modified: directory/apacheds/trunk/server-annotations/src/main/java/org/apache/directory/server/factory/ServerAnnotationProcessor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-annotations/src/main/java/org/apache/directory/server/factory/ServerAnnotationProcessor.java?rev=1158385&r1=1158384&r2=1158385&view=diff
==============================================================================
--- directory/apacheds/trunk/server-annotations/src/main/java/org/apache/directory/server/factory/ServerAnnotationProcessor.java (original)
+++ directory/apacheds/trunk/server-annotations/src/main/java/org/apache/directory/server/factory/ServerAnnotationProcessor.java Tue Aug 16 17:23:04 2011
@@ -37,9 +37,9 @@ import org.apache.directory.server.ldap.
 import org.apache.directory.server.ldap.handlers.bind.MechanismHandler;
 import org.apache.directory.server.ldap.handlers.bind.ntlm.NtlmMechanismHandler;
 import org.apache.directory.server.ldap.handlers.bind.ntlm.NtlmProvider;
-import org.apache.directory.server.ldap.replication.ReplicationConsumer;
-import org.apache.directory.server.ldap.replication.SyncReplConsumer;
 import org.apache.directory.server.ldap.replication.SyncreplConfiguration;
+import org.apache.directory.server.ldap.replication.consumer.ReplicationConsumer;
+import org.apache.directory.server.ldap.replication.consumer.SyncReplConsumer;
 import org.apache.directory.server.protocol.shared.transport.TcpTransport;
 import org.apache.directory.server.protocol.shared.transport.Transport;
 import org.apache.directory.server.protocol.shared.transport.UdpTransport;

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientInitialRefreshIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientInitialRefreshIT.java?rev=1158385&r1=1158384&r2=1158385&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientInitialRefreshIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientInitialRefreshIT.java Tue Aug 16 17:23:04 2011
@@ -38,9 +38,9 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.factory.ServerAnnotationProcessor;
 import org.apache.directory.server.ldap.LdapServer;
-import org.apache.directory.server.ldap.replication.ReplicationConsumer;
-import org.apache.directory.server.ldap.replication.SyncReplRequestHandler;
 import org.apache.directory.server.ldap.replication.SyncreplConfiguration;
+import org.apache.directory.server.ldap.replication.consumer.ReplicationConsumer;
+import org.apache.directory.server.ldap.replication.provider.SyncReplRequestHandler;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.message.SearchRequest;

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java?rev=1158385&r1=1158384&r2=1158385&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java Tue Aug 16 17:23:04 2011
@@ -43,9 +43,9 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.factory.ServerAnnotationProcessor;
 import org.apache.directory.server.ldap.LdapServer;
-import org.apache.directory.server.ldap.replication.ReplicationConsumer;
-import org.apache.directory.server.ldap.replication.SyncReplConsumer;
-import org.apache.directory.server.ldap.replication.SyncReplRequestHandler;
+import org.apache.directory.server.ldap.replication.consumer.ReplicationConsumer;
+import org.apache.directory.server.ldap.replication.consumer.SyncReplConsumer;
+import org.apache.directory.server.ldap.replication.provider.SyncReplRequestHandler;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.message.ModifyRequest;

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/MockSyncReplConsumer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/MockSyncReplConsumer.java?rev=1158385&r1=1158384&r2=1158385&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/MockSyncReplConsumer.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/MockSyncReplConsumer.java Tue Aug 16 17:23:04 2011
@@ -37,9 +37,9 @@ import org.apache.directory.ldap.client.
 import org.apache.directory.ldap.client.api.future.SearchFuture;
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
-import org.apache.directory.server.ldap.replication.ReplicationConsumer;
 import org.apache.directory.server.ldap.replication.ReplicationConsumerConfig;
 import org.apache.directory.server.ldap.replication.SyncreplConfiguration;
+import org.apache.directory.server.ldap.replication.consumer.ReplicationConsumer;
 import org.apache.directory.shared.ldap.codec.api.LdapApiService;
 import org.apache.directory.shared.ldap.codec.api.LdapApiServiceFactory;
 import org.apache.directory.shared.ldap.extras.controls.SyncDoneValue;

Modified: directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/ServiceBuilder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/ServiceBuilder.java?rev=1158385&r1=1158384&r2=1158385&view=diff
==============================================================================
--- directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/ServiceBuilder.java (original)
+++ directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/ServiceBuilder.java Tue Aug 16 17:23:04 2011
@@ -81,11 +81,11 @@ import org.apache.directory.server.ldap.
 import org.apache.directory.server.ldap.LdapServer;
 import org.apache.directory.server.ldap.handlers.bind.MechanismHandler;
 import org.apache.directory.server.ldap.handlers.bind.ntlm.NtlmMechanismHandler;
-import org.apache.directory.server.ldap.replication.ReplicationConsumer;
-import org.apache.directory.server.ldap.replication.ReplicationRequestHandler;
 import org.apache.directory.server.ldap.replication.ReplicationTrustManager;
-import org.apache.directory.server.ldap.replication.SyncReplConsumer;
 import org.apache.directory.server.ldap.replication.SyncreplConfiguration;
+import org.apache.directory.server.ldap.replication.consumer.ReplicationConsumer;
+import org.apache.directory.server.ldap.replication.consumer.SyncReplConsumer;
+import org.apache.directory.server.ldap.replication.provider.ReplicationRequestHandler;
 import org.apache.directory.server.ntp.NtpServer;
 import org.apache.directory.server.protocol.shared.transport.TcpTransport;
 import org.apache.directory.server.protocol.shared.transport.Transport;



Mime
View raw message