You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ka...@apache.org on 2013/05/30 17:15:09 UTC

svn commit: r1487891 - /directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumerImpl.java

Author: kayyagari
Date: Thu May 30 15:15:09 2013
New Revision: 1487891

URL: http://svn.apache.org/r1487891
Log:
o reverted the attributes removed in commit 1486738 , they will never be modified
o fixed the disconnect() method to try to store cookie always at the end

Modified:
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumerImpl.java

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumerImpl.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumerImpl.java?rev=1487891&r1=1487890&r2=1487891&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumerImpl.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumerImpl.java Thu May 30 15:15:09 2013
@@ -136,6 +136,8 @@ public class ReplicationConsumerImpl imp
         {
             SchemaConstants.ENTRY_UUID_AT,
             SchemaConstants.ENTRY_DN_AT,
+            SchemaConstants.CREATE_TIMESTAMP_AT,
+            SchemaConstants.CREATORS_NAME_AT,
             SchemaConstants.ENTRY_PARENT_ID_AT,
             SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT
     };
@@ -861,42 +863,37 @@ public class ReplicationConsumerImpl imp
     {
         disconnected = true;
 
-        if ( connection == null )
-        {
-            return;
-        }
-
-        if ( connection.isConnected() )
+        try
         {
-            try
+            if ( ( connection != null ) && connection.isConnected() )
             {
                 connection.unBind();
                 LOG.info( "Unbound from the server {}", config.getProducer() );
-
+                
                 if ( CONSUMER_LOG.isDebugEnabled() )
                 {
                     MDC.put( "Replica", Integer.toString( config.getReplicaId() ) );
                     CONSUMER_LOG.info( "Unbound from the server {}", config.getProducer() );
                 }
-
+                
                 connection.close();
                 LOG.info( "Connection closed for the server {}", config.getProducer() );
                 CONSUMER_LOG.info( "Connection closed for the server {}", config.getProducer() );
-
+                
                 connection = null;
             }
-            catch ( Exception e )
-            {
-                LOG.error( "Failed to close the connection", e );
-            }
-            finally
-            {
-                // persist the cookie
-                storeCookie();
-
-                // reset the cookie
-                syncCookie = null;
-            }
+        }
+        catch ( Exception e )
+        {
+            LOG.error( "Failed to close the connection", e );
+        }
+        finally
+        {
+            // persist the cookie
+            storeCookie();
+            
+            // reset the cookie
+            syncCookie = null;
         }
     }