directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1414174 - in /directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication: ReplicaEventMessage.java provider/SyncReplSearchListener.java
Date Tue, 27 Nov 2012 13:17:32 GMT
Author: kayyagari
Date: Tue Nov 27 13:17:30 2012
New Revision: 1414174

URL: http://svn.apache.org/viewvc?rev=1414174&view=rev
Log:
always store the modified entry in the event message

Modified:
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventMessage.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplSearchListener.java

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventMessage.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventMessage.java?rev=1414174&r1=1414173&r2=1414174&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventMessage.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventMessage.java
Tue Nov 27 13:17:30 2012
@@ -21,6 +21,7 @@
 package org.apache.directory.server.ldap.replication;
 
 
+import org.apache.directory.server.core.api.entry.ClonedServerEntry;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.message.controls.ChangeType;
@@ -47,7 +48,15 @@ public class ReplicaEventMessage
     public ReplicaEventMessage( ChangeType changeType, Entry entry )
     {
         this.changeType = changeType;
-        this.entry = entry;
+        
+        if ( entry instanceof ClonedServerEntry )
+        {
+            this.entry = ( ( ClonedServerEntry ) entry ).getClonedEntry();
+        }
+        else
+        {
+            this.entry = entry;
+        }
     }
 
 

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/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?rev=1414174&r1=1414173&r2=1414174&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplSearchListener.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplSearchListener.java
Tue Nov 27 13:17:30 2012
@@ -221,7 +221,7 @@ public class SyncReplSearchListener impl
         {
             //System.out.println( "ADD Listener : log " + entry.getDn() );
             // we log it first
-            consumerMsgLog.log( new ReplicaEventMessage( ChangeType.ADD, ((ClonedServerEntry)entry).getClonedEntry()
) );
+            consumerMsgLog.log( new ReplicaEventMessage( ChangeType.ADD, entry ) );
 
             // We send the added entry directly to the consumer if it's connected
             if ( pushInRealTime )



Mime
View raw message