directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r676342 - in /directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis: operation/ operation/support/ service/ service/protocol/handler/
Date Sun, 13 Jul 2008 15:25:40 GMT
Author: elecharny
Date: Sun Jul 13 08:25:40 2008
New Revision: 676342

URL: http://svn.apache.org/viewvc?rev=676342&view=rev
Log:
The replication execute() method needs to get a CoreSession parameter instead of a OperationContext,
as it may need to deal with CompositeOperation.

Modified:
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddAttributeOperation.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddEntryOperation.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/AttributeOperation.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/CompositeOperation.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/DeleteAttributeOperation.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/Operation.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/ReplaceAttributeOperation.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/support/EntryUtil.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationInterceptor.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationServerContextHandler.java

Modified: directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddAttributeOperation.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddAttributeOperation.java?rev=676342&r1=676341&r2=676342&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddAttributeOperation.java
(original)
+++ directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddAttributeOperation.java
Sun Jul 13 08:25:40 2008
@@ -21,11 +21,11 @@
 
 
 import org.apache.directory.mitosis.common.CSN;
+import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.entry.ServerAttribute;
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
-import org.apache.directory.server.core.interceptor.context.OperationContext;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.entry.ModificationOperation;
@@ -61,13 +61,13 @@
     }
 
 
-    protected void execute1( PartitionNexus nexus, OperationContext opContext ) throws Exception
+    protected void execute1( PartitionNexus nexus, CoreSession coreSession ) throws Exception
     {
-        DirectoryService ds = opContext.getSession().getDirectoryService();
+        DirectoryService ds = coreSession.getDirectoryService();
         ServerEntry serverEntry = ds.newEntry( LdapDN.EMPTY_LDAPDN );
         ServerAttribute attribute = getAttribute( ds.getRegistries().getAttributeTypeRegistry()
);
         serverEntry.put( attribute );
         List<Modification> items = ModifyOperationContext.createModItems( serverEntry,
ModificationOperation.ADD_ATTRIBUTE );
-        nexus.modify( new ModifyOperationContext( opContext.getSession(), getName(), items
) );
+        nexus.modify( new ModifyOperationContext( coreSession, getName(), items ) );
     }
 }

Modified: directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddEntryOperation.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddEntryOperation.java?rev=676342&r1=676341&r2=676342&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddEntryOperation.java
(original)
+++ directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddEntryOperation.java
Sun Jul 13 08:25:40 2008
@@ -25,6 +25,7 @@
 import org.apache.directory.mitosis.common.CSN;
 import org.apache.directory.mitosis.operation.support.EntryUtil;
 import org.apache.directory.mitosis.store.ReplicationStore;
+import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.entry.ServerEntryUtils;
@@ -33,7 +34,6 @@
 import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
 import org.apache.directory.server.core.interceptor.context.ListOperationContext;
 import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
-import org.apache.directory.server.core.interceptor.context.OperationContext;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.name.LdapDN;
@@ -71,51 +71,51 @@
     }
 
 
-    protected void execute0( PartitionNexus nexus, ReplicationStore store, OperationContext
opContext )
+    protected void execute0( PartitionNexus nexus, ReplicationStore store, CoreSession coreSession
)
         throws Exception
     {
-        Registries registries = opContext.getSession().getDirectoryService().getRegistries();
+        Registries registries = coreSession.getDirectoryService().getRegistries();
         
-        if ( ! EntryUtil.isEntryUpdatable( opContext, dn, getCSN() ) )
+        if ( ! EntryUtil.isEntryUpdatable( coreSession, dn, getCSN() ) )
         {
             return;
         }
         
-        EntryUtil.createGlueEntries( opContext, dn, false );
+        EntryUtil.createGlueEntries( coreSession, dn, false );
 
         // Replace the entry if an entry with the same name exists.
-        if ( nexus.lookup( new LookupOperationContext( opContext.getSession(), dn ) ) !=
null )
+        if ( nexus.lookup( new LookupOperationContext( coreSession, dn ) ) != null )
         {
-            recursiveDelete( nexus, dn, opContext );
+            recursiveDelete( nexus, dn, coreSession );
         }
 
-        nexus.add( new AddOperationContext( opContext.getSession(), 
+        nexus.add( new AddOperationContext( coreSession, 
             ServerEntryUtils.toServerEntry( entry, dn, registries ) ) );
     }
 
 
     @SuppressWarnings("unchecked")
-    private void recursiveDelete( PartitionNexus nexus, LdapDN normalizedName, OperationContext
opContext )
+    private void recursiveDelete( PartitionNexus nexus, LdapDN normalizedName, CoreSession
coreSession )
         throws Exception
     {
-        EntryFilteringCursor cursor = nexus.list( new ListOperationContext( opContext.getSession(),
normalizedName ) );
+        EntryFilteringCursor cursor = nexus.list( new ListOperationContext( coreSession,
normalizedName ) );
         
         if ( !cursor.available() )
         {
-            nexus.delete( new DeleteOperationContext( opContext.getSession(), normalizedName
) );
+            nexus.delete( new DeleteOperationContext( coreSession, normalizedName ) );
             return;
         }
 
-        Registries registries = opContext.getSession().getDirectoryService().getRegistries();
+        Registries registries = coreSession.getDirectoryService().getRegistries();
         while ( cursor.next() )
         {
             ClonedServerEntry sr = cursor.get();
             LdapDN dn = sr.getDn();
             dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
-            recursiveDelete( nexus, dn, opContext );
+            recursiveDelete( nexus, dn, coreSession );
         }
         
-        nexus.delete( new DeleteOperationContext( opContext.getSession(), normalizedName
) );
+        nexus.delete( new DeleteOperationContext( coreSession, normalizedName ) );
     }
 
 

Modified: directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/AttributeOperation.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/AttributeOperation.java?rev=676342&r1=676341&r2=676342&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/AttributeOperation.java
(original)
+++ directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/AttributeOperation.java
Sun Jul 13 08:25:40 2008
@@ -24,9 +24,9 @@
 import javax.naming.directory.Attribute;
 import javax.naming.directory.InvalidAttributeIdentifierException;
 
+import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.entry.ServerAttribute;
 import org.apache.directory.server.core.entry.ServerEntryUtils;
-import org.apache.directory.server.core.interceptor.context.OperationContext;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.shared.ldap.name.LdapDN;
@@ -95,21 +95,21 @@
     }
 
 
-    protected final void execute0( PartitionNexus nexus, ReplicationStore store, OperationContext
opContext ) 
+    protected final void execute0( PartitionNexus nexus, ReplicationStore store, CoreSession
coreSession ) 
         throws Exception
     {
-        if ( ! EntryUtil.isEntryUpdatable( opContext, name, getCSN() ) )
+        if ( ! EntryUtil.isEntryUpdatable( coreSession, name, getCSN() ) )
         {
             return;
         }
         
-        EntryUtil.createGlueEntries( opContext, name, true );
+        EntryUtil.createGlueEntries( coreSession, name, true );
 
-        execute1( nexus, opContext );
+        execute1( nexus, coreSession );
     }
 
 
-    protected abstract void execute1( PartitionNexus nexus, OperationContext opContext )
throws Exception;
+    protected abstract void execute1( PartitionNexus nexus, CoreSession coreSession ) throws
Exception;
 
 
     /**

Modified: directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/CompositeOperation.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/CompositeOperation.java?rev=676342&r1=676341&r2=676342&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/CompositeOperation.java
(original)
+++ directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/CompositeOperation.java
Sun Jul 13 08:25:40 2008
@@ -27,9 +27,9 @@
 import org.apache.directory.mitosis.configuration.ReplicationConfiguration;
 import org.apache.directory.mitosis.store.ReplicationLogIterator;
 import org.apache.directory.mitosis.store.ReplicationStore;
+import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.partition.PartitionNexus;
-import org.apache.directory.server.schema.registries.Registries;
 
 import javax.naming.Name;
 import java.util.ArrayList;
@@ -159,12 +159,12 @@
     }
 
 
-    protected void execute0( PartitionNexus nexus, ReplicationStore store, Registries registries
) 
+    protected void execute0( PartitionNexus nexus, ReplicationStore store, CoreSession coreSession
) 
         throws Exception
     {
         for ( Operation op : children )
         {
-            op.execute( nexus, DUMMY_STORE, registries );
+            op.execute( nexus, DUMMY_STORE, coreSession );
         }
     }
 

Modified: directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/DeleteAttributeOperation.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/DeleteAttributeOperation.java?rev=676342&r1=676341&r2=676342&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/DeleteAttributeOperation.java
(original)
+++ directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/DeleteAttributeOperation.java
Sun Jul 13 08:25:40 2008
@@ -21,11 +21,11 @@
 
 
 import org.apache.directory.mitosis.common.CSN;
+import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.entry.ServerAttribute;
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
-import org.apache.directory.server.core.interceptor.context.OperationContext;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.entry.ModificationOperation;
@@ -61,15 +61,15 @@
     }
 
 
-    protected void execute1( PartitionNexus nexus, OperationContext opContext ) throws Exception
+    protected void execute1( PartitionNexus nexus, CoreSession coreSession ) throws Exception
     {
-        DirectoryService ds = opContext.getSession().getDirectoryService();
+        DirectoryService ds = coreSession.getDirectoryService();
         ServerEntry serverEntry = ds.newEntry( LdapDN.EMPTY_LDAPDN );
         ServerAttribute attribute = getAttribute( ds.getRegistries().getAttributeTypeRegistry()
);
         serverEntry.put( attribute );
         List<Modification> items = ModifyOperationContext.createModItems( serverEntry,

             ModificationOperation.REMOVE_ATTRIBUTE );
 
-        nexus.modify( new ModifyOperationContext( opContext.getSession(), getName(), items
) );
+        nexus.modify( new ModifyOperationContext( coreSession, getName(), items ) );
     }
 }

Modified: directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/Operation.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/Operation.java?rev=676342&r1=676341&r2=676342&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/Operation.java
(original)
+++ directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/Operation.java
Sun Jul 13 08:25:40 2008
@@ -27,9 +27,9 @@
 import org.apache.directory.mitosis.common.CSN;
 import org.apache.directory.mitosis.common.Constants;
 import org.apache.directory.mitosis.store.ReplicationStore;
+import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.PartitionNexus;
-import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
 
@@ -99,18 +99,18 @@
     /**
      * Executes this operation on the specified nexus.
      */
-    public final void execute( PartitionNexus nexus, ReplicationStore store, Registries registries
) 
+    public final void execute( PartitionNexus nexus, ReplicationStore store, CoreSession
coreSession ) 
         throws Exception
     {
         synchronized ( nexus )
         {
-            execute0( nexus, store, registries );
+            execute0( nexus, store, coreSession );
             store.putLog( this );
         }
     }
 
     @SuppressWarnings("unused")
-    protected void execute0( PartitionNexus nexus, ReplicationStore store, Registries registries
) 
+    protected void execute0( PartitionNexus nexus, ReplicationStore store, CoreSession coreSession
) 
         throws Exception
     {
         throw new OperationNotSupportedException( nexus.getSuffixDn().toString() );

Modified: directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/ReplaceAttributeOperation.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/ReplaceAttributeOperation.java?rev=676342&r1=676341&r2=676342&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/ReplaceAttributeOperation.java
(original)
+++ directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/ReplaceAttributeOperation.java
Sun Jul 13 08:25:40 2008
@@ -21,11 +21,11 @@
 
 
 import org.apache.directory.mitosis.common.CSN;
+import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.entry.ServerAttribute;
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
-import org.apache.directory.server.core.interceptor.context.OperationContext;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.entry.ModificationOperation;
@@ -63,15 +63,15 @@
     }
 
 
-    protected void execute1( PartitionNexus nexus, OperationContext opContext ) throws Exception
+    protected void execute1( PartitionNexus nexus, CoreSession coreSession ) throws Exception
     {
-        DirectoryService ds = opContext.getSession().getDirectoryService();
+        DirectoryService ds = coreSession.getDirectoryService();
         ServerEntry serverEntry = ds.newEntry( LdapDN.EMPTY_LDAPDN );
         ServerAttribute attribute = getAttribute( ds.getRegistries().getAttributeTypeRegistry()
);
         serverEntry.put( attribute );
         List<Modification> items = ModifyOperationContext.createModItems( serverEntry,

             ModificationOperation.REPLACE_ATTRIBUTE );
 
-        nexus.modify( new ModifyOperationContext( opContext.getSession(), getName(), items
) );
+        nexus.modify( new ModifyOperationContext( coreSession, getName(), items ) );
     }
 }

Modified: directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/support/EntryUtil.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/support/EntryUtil.java?rev=676342&r1=676341&r2=676342&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/support/EntryUtil.java
(original)
+++ directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/support/EntryUtil.java
Sun Jul 13 08:25:40 2008
@@ -22,11 +22,12 @@
 
 import javax.naming.NameNotFoundException;
 
+import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
-import org.apache.directory.server.core.interceptor.context.OperationContext;
+import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
@@ -41,11 +42,12 @@
 public class EntryUtil
 {
     @SuppressWarnings("unchecked")
-    public static boolean isEntryUpdatable( OperationContext opContext, LdapDN name, CSN
newCSN ) 
+    public static boolean isEntryUpdatable( CoreSession coreSession, LdapDN name, CSN newCSN
) 
         throws Exception
     {
-        PartitionNexus nexus = opContext.getSession().getDirectoryService().getPartitionNexus();
-        ServerEntry entry = nexus.lookup( opContext.newLookupContext( name ) );
+        PartitionNexus nexus = coreSession.getDirectoryService().getPartitionNexus();
+        LookupOperationContext lookupContext = new LookupOperationContext( coreSession, name
); 
+        ServerEntry entry = nexus.lookup( lookupContext );
 
         if ( entry == null )
         {
@@ -85,32 +87,32 @@
     }
 
 
-    public static void createGlueEntries( OperationContext opContext, LdapDN name, boolean
includeLeaf )
+    public static void createGlueEntries( CoreSession coreSession, LdapDN name, boolean includeLeaf
)
         throws Exception
     {
         assert name.size() > 0;
 
         for ( int i = name.size() - 1; i > 0; i-- )
         {
-            createGlueEntry( opContext, ( LdapDN ) name.getSuffix( i ) );
+            createGlueEntry( coreSession, ( LdapDN ) name.getSuffix( i ) );
         }
 
         if ( includeLeaf )
         {
-            createGlueEntry( opContext, name );
+            createGlueEntry( coreSession, name );
         }
     }
 
 
-    private static void createGlueEntry( OperationContext opContext, LdapDN name ) 
+    private static void createGlueEntry( CoreSession coreSession, LdapDN name ) 
         throws Exception
     {
-        DirectoryService ds = opContext.getSession().getDirectoryService();
+        DirectoryService ds = coreSession.getDirectoryService();
         PartitionNexus nexus = ds.getPartitionNexus();
         
         try
         {
-            if ( nexus.hasEntry( new EntryOperationContext( opContext.getSession(), name
) ) )
+            if ( nexus.hasEntry( new EntryOperationContext( coreSession, name ) ) )
             {
                 return;
             }
@@ -134,7 +136,7 @@
         entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, SchemaConstants.EXTENSIBLE_OBJECT_OC
);
 
         // And add it to the nexus.
-        nexus.add( new AddOperationContext( opContext.getSession(), entry ) );
+        nexus.add( new AddOperationContext( coreSession, entry ) );
     }
 
 

Modified: directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationInterceptor.java?rev=676342&r1=676341&r2=676342&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationInterceptor.java
(original)
+++ directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationInterceptor.java
Sun Jul 13 08:25:40 2008
@@ -400,22 +400,22 @@
     {
         Operation op = operationFactory.newAdd( 
             addContext.getDn(), addContext.getEntry() );
-        op.execute( nexus, store, registries );
+        op.execute( nexus, store, addContext.getSession() );
     }
 
 
     @Override
-    public void delete( NextInterceptor next, DeleteOperationContext opContext ) throws Exception
+    public void delete( NextInterceptor next, DeleteOperationContext deleteContext ) throws
Exception
     {
-        Operation op = operationFactory.newDelete( opContext.getDn() );
-        op.execute( nexus, store, registries );
+        Operation op = operationFactory.newDelete( deleteContext.getDn() );
+        op.execute( nexus, store, deleteContext.getSession() );
     }
 
 
     public void modify( NextInterceptor next, ModifyOperationContext modifyContext ) throws
Exception
     {
         Operation op = operationFactory.newModify( modifyContext );
-        op.execute( nexus, store, registries );
+        op.execute( nexus, store, modifyContext.getSession() );
     }
 
 
@@ -423,7 +423,7 @@
     public void move( NextInterceptor next, MoveOperationContext moveOpContext ) throws Exception
     {
         Operation op = operationFactory.newMove( moveOpContext.getDn(), moveOpContext.getParent()
);
-        op.execute( nexus, store, registries );
+        op.execute( nexus, store, moveOpContext.getSession() );
     }
 
 
@@ -433,7 +433,7 @@
         Operation op = operationFactory.newMove( moveAndRenameOpContext.getDn(),
                 moveAndRenameOpContext.getParent(), moveAndRenameOpContext.getNewRdn(),
                 moveAndRenameOpContext.getDelOldDn() );
-        op.execute( nexus, store, registries );
+        op.execute( nexus, store, moveAndRenameOpContext.getSession() );
     }
 
 
@@ -441,7 +441,7 @@
     public void rename( NextInterceptor next, RenameOperationContext renameOpContext ) throws
Exception
     {
         Operation op = operationFactory.newModifyRn( renameOpContext.getDn(), renameOpContext.getNewRdn(),
renameOpContext.getDelOldDn() );
-        op.execute( nexus, store, registries );
+        op.execute( nexus, store, renameOpContext.getSession() );
     }
 
 

Modified: directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationServerContextHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationServerContextHandler.java?rev=676342&r1=676341&r2=676342&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationServerContextHandler.java
(original)
+++ directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationServerContextHandler.java
Sun Jul 13 08:25:40 2008
@@ -176,7 +176,7 @@
         ctx.getSession().close();
     }
 
-
+    
     private synchronized void onLogEntry( ReplicationContext ctx, LogEntryMessage message
) throws Exception
     {
         // Return error if other replica than what is in progress sends
@@ -192,7 +192,8 @@
         try
         {
             op.execute( ctx.getDirectoryService().getPartitionNexus(), ctx.getConfiguration().getStore(),
-                ctx.getDirectoryService().getRegistries() );
+            		ctx.getDirectoryService().getSession() );
+            
             ack = new LogEntryAckMessage( message.getSequence(), Constants.OK );
         }
         catch ( Exception e )



Mime
View raw message