directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1129133 - in /directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication: ReplicaEventLog.java SyncReplRequestHandler.java
Date Mon, 30 May 2011 11:55:34 GMT
Author: kayyagari
Date: Mon May 30 11:55:33 2011
New Revision: 1129133

URL: http://svn.apache.org/viewvc?rev=1129133&view=rev
Log:
o removed the call to truncate from destroy method and renamed destroy() to stop()
o improved exception handling and logging in syncrepl request handler

Modified:
    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/SyncReplRequestHandler.java

Modified: 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/ReplicaEventLog.java?rev=1129133&r1=1129132&r2=1129133&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/ReplicaEventLog.java
Mon May 30 11:55:33 2011
@@ -175,11 +175,8 @@ public class ReplicaEventLog
     }
 
 
-    public void destroy() throws Exception
+    public void stop() throws Exception
     {
-        // first truncate
-        truncate();
-
         // then close the producer and session, DO NOT close connection 
         producer.close();
         amqSession.close();

Modified: 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/SyncReplRequestHandler.java?rev=1129133&r1=1129132&r2=1129133&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/SyncReplRequestHandler.java
Mon May 30 11:55:33 2011
@@ -197,9 +197,21 @@ public class SyncReplRequestHandler impl
 
     public void stop()
     {
+        for ( ReplicaEventLog log : replicaLogMap.values() )
+        {
+            try
+            {
+                log.stop();
+            }
+            catch( Exception e )
+            {
+                LOG.warn( "Failed to close the event log {}", log.getId() );
+                LOG.warn( "", e );
+            }
+        }
+        
         try
         {
-            brokerService.stop();
             amqConnection.close();
         }
         catch ( Exception e )
@@ -207,6 +219,15 @@ public class SyncReplRequestHandler impl
             LOG.warn( "Failed to close the message queue connection", e );
         }
 
+        try
+        {
+            brokerService.stop();
+        }
+        catch ( Exception e )
+        {
+            LOG.warn( "Failed to close the message broker service", e );
+        }
+
         initialized = false;
     }
 



Mime
View raw message