You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2011/11/10 17:21:16 UTC

svn commit: r1200408 [4/5] - in /directory/apacheds/branches/apacheds-txns: core-api/ core-api/src/main/java/org/apache/directory/server/core/api/ core-api/src/main/java/org/apache/directory/server/core/api/interceptor/ core-api/src/main/java/org/apach...

Modified: directory/apacheds/branches/apacheds-txns/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java (original)
+++ directory/apacheds/branches/apacheds-txns/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java Thu Nov 10 16:21:12 2011
@@ -95,7 +95,7 @@ public class DefaultAuthorizationInterce
         }
     }
 
-    
+
     /**
      * Creates a new instance.
      */
@@ -152,11 +152,11 @@ public class DefaultAuthorizationInterce
     //    Lookup, search and list operations need to be handled using a filter
     // and so we need access to the filter service.
 
-    public void delete( NextInterceptor nextInterceptor, DeleteOperationContext deleteContext ) throws LdapException
+    public void delete( DeleteOperationContext deleteContext ) throws LdapException
     {
         if ( deleteContext.getSession().getDirectoryService().isAccessControlEnabled() )
         {
-            nextInterceptor.delete( deleteContext );
+            next( deleteContext );
             return;
         }
 
@@ -176,7 +176,7 @@ public class DefaultAuthorizationInterce
             throw new LdapNoPermissionException( msg );
         }
 
-        Dn principalDn = getPrincipal().getDn();
+        Dn principalDn = getPrincipal( deleteContext ).getDn();
 
         if ( dn.equals( ADMIN_SYSTEM_DN ) )
         {
@@ -202,7 +202,7 @@ public class DefaultAuthorizationInterce
             }
         }
 
-        nextInterceptor.delete( deleteContext );
+        next( deleteContext );
     }
 
 
@@ -234,7 +234,7 @@ public class DefaultAuthorizationInterce
         {
             Dn dn = modifyContext.getDn();
 
-            protectModifyAlterations( dn );
+            protectModifyAlterations( modifyContext, dn );
             nextInterceptor.modify( modifyContext );
 
             // update administrators if we change administrators group
@@ -250,9 +250,9 @@ public class DefaultAuthorizationInterce
     }
 
 
-    private void protectModifyAlterations( Dn dn ) throws LdapException
+    private void protectModifyAlterations( OperationContext opCtx, Dn dn ) throws LdapException
     {
-        Dn principalDn = getPrincipal().getDn();
+        Dn principalDn = getPrincipal( opCtx ).getDn();
 
         if ( dn.isEmpty() )
         {
@@ -264,7 +264,7 @@ public class DefaultAuthorizationInterce
         if ( !isAnAdministrator( principalDn ) )
         {
             // allow self modifications
-            if ( dn.equals( getPrincipal() ) )
+            if ( dn.equals( getPrincipal( opCtx ) ) )
             {
                 return;
             }
@@ -309,7 +309,7 @@ public class DefaultAuthorizationInterce
     {
         if ( !renameContext.getSession().getDirectoryService().isAccessControlEnabled() )
         {
-            protectDnAlterations( renameContext.getDn() );
+            protectDnAlterations( renameContext, renameContext.getDn() );
         }
 
         nextInterceptor.rename( renameContext );
@@ -323,28 +323,27 @@ public class DefaultAuthorizationInterce
     {
         if ( !moveContext.getSession().getDirectoryService().isAccessControlEnabled() )
         {
-            protectDnAlterations( moveContext.getDn() );
+            protectDnAlterations( moveContext, moveContext.getDn() );
         }
 
         nextInterceptor.move( moveContext );
     }
 
 
-    public void moveAndRename( NextInterceptor nextInterceptor, MoveAndRenameOperationContext moveAndRenameContext )
-        throws LdapException
+    public void moveAndRename( NextInterceptor nextInterceptor, MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
     {
         if ( !moveAndRenameContext.getSession().getDirectoryService().isAccessControlEnabled() )
         {
-            protectDnAlterations( moveAndRenameContext.getDn() );
+            protectDnAlterations( moveAndRenameContext, moveAndRenameContext.getDn() );
         }
 
         nextInterceptor.moveAndRename( moveAndRenameContext );
     }
 
 
-    private void protectDnAlterations( Dn dn ) throws LdapException
+    private void protectDnAlterations( OperationContext opCtx, Dn dn ) throws LdapException
     {
-        Dn principalDn = getPrincipal().getDn();
+        Dn principalDn = getPrincipal( opCtx ).getDn();
 
         if ( dn.isEmpty() )
         {
@@ -383,10 +382,10 @@ public class DefaultAuthorizationInterce
     }
 
 
-    public Entry lookup( NextInterceptor nextInterceptor, LookupOperationContext lookupContext ) throws LdapException
+    public Entry lookup( LookupOperationContext lookupContext ) throws LdapException
     {
         CoreSession session = lookupContext.getSession();
-        Entry entry = nextInterceptor.lookup( lookupContext );
+        Entry entry = next( lookupContext );
 
         if ( session.getDirectoryService().isAccessControlEnabled() )
         {
@@ -448,8 +447,7 @@ public class DefaultAuthorizationInterce
     }
 
 
-    public EntryFilteringCursor search( NextInterceptor nextInterceptor, SearchOperationContext searchContext )
-        throws LdapException
+    public EntryFilteringCursor search( NextInterceptor nextInterceptor, SearchOperationContext searchContext ) throws LdapException
     {
         EntryFilteringCursor cursor = nextInterceptor.search( searchContext );
 
@@ -464,10 +462,12 @@ public class DefaultAuthorizationInterce
     }
 
 
-    public EntryFilteringCursor list( NextInterceptor nextInterceptor, ListOperationContext listContext )
-        throws LdapException
+    /**
+     * {@inheritDoc}
+     */
+    public EntryFilteringCursor list( ListOperationContext listContext ) throws LdapException
     {
-        EntryFilteringCursor cursor = nextInterceptor.list( listContext );
+        EntryFilteringCursor cursor = next( listContext );
 
         if ( listContext.getSession().getDirectoryService().isAccessControlEnabled() )
         {
@@ -475,6 +475,7 @@ public class DefaultAuthorizationInterce
         }
 
         cursor.addEntryFilter( new DefaultAuthorizationSearchFilter() );
+
         return cursor;
     }
 

Modified: directory/apacheds/branches/apacheds-txns/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java (original)
+++ directory/apacheds/branches/apacheds-txns/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java Thu Nov 10 16:21:12 2011
@@ -25,8 +25,10 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.HashSet;
 
+import org.apache.directory.server.core.api.CoreSession;
 import org.apache.directory.server.core.api.event.Evaluator;
 import org.apache.directory.server.core.api.event.ExpressionEvaluator;
+import org.apache.directory.server.core.api.interceptor.context.LookupOperationContext;
 import org.apache.directory.server.core.api.subtree.SubtreeEvaluator;
 import org.apache.directory.server.core.api.subtree.RefinementEvaluator;
 import org.apache.directory.server.core.api.subtree.RefinementLeafEvaluator;
@@ -107,27 +109,6 @@ public class ACDFEngine
         }
     }
 
-    public static final Collection<String> USER_LOOKUP_BYPASS;
-    static
-    {
-        Collection<String> c = new HashSet<String>();
-        c.add( "NormalizationInterceptor" );
-        c.add( "AuthenticationInterceptor" );
-//        c.add( ReferralInterceptor.class.getName() );
-        c.add( "AciAuthorizationInterceptor" );
-        c.add( "DefaultAuthorizationInterceptor" );
-        c.add( "AdministrativePointInterceptor" );
-//        c.add( ExceptionInterceptor.class.getName() );
-        c.add( "OperationalAttributeInterceptor" );
-        c.add( "SchemaInterceptor" );
-        c.add( "SubentryInterceptor" );
-//        c.add( CollectiveAttributeInterceptor.class.getName() );
-        c.add( "EventInterceptor" );
-        c.add( "TriggerInterceptor" );
-        USER_LOOKUP_BYPASS = Collections.unmodifiableCollection( c );
-    }
-
-
     /**
      * Returns <tt>true</tt> if the user with the specified name can access the specified resource
      * (entry, attribute type, or attribute value) and throws {@link org.apache.directory.shared.ldap.model.exception.LdapNoPermissionException}
@@ -143,7 +124,9 @@ public class ACDFEngine
             throw new IllegalArgumentException( "entryName" );
         }
 
-        Entry userEntry = aciContext.getOperationContext().lookup( aciContext.getUserDn(), USER_LOOKUP_BYPASS, SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+        CoreSession session = aciContext.getOperationContext().getSession();
+        LookupOperationContext lookupContext = new LookupOperationContext( session, aciContext.getUserDn(), SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+        Entry userEntry = session.getDirectoryService().getPartitionNexus().lookup( lookupContext );
 
         // Determine the scope of the requested operation.
         OperationScope scope;

Modified: directory/apacheds/branches/apacheds-txns/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java (original)
+++ directory/apacheds/branches/apacheds-txns/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java Thu Nov 10 16:21:12 2011
@@ -132,22 +132,6 @@ public class MaxImmSubFilter implements 
         return aciContext.getAciTuples();
     }
 
-    public static final Collection<String> SEARCH_BYPASS;
-    static
-    {
-        Collection<String> c = new HashSet<String>();
-        c.add( "NormalizationInterceptor" );
-        c.add( "AuthenticationInterceptor" );
-        c.add( "AciAuthorizationInterceptor" );
-        c.add( "DefaultAuthorizationInterceptor" );
-        c.add( "AdministrativePointInterceptor" );
-        c.add( "OperationalAttributeInterceptor" );
-        c.add( "SchemaInterceptor" );
-        c.add( "SubentryInterceptor" );
-        c.add( "EventInterceptor" );
-        SEARCH_BYPASS = Collections.unmodifiableCollection( c );
-    }
-
 
     private int getImmSubCount( OperationContext opContext, Dn entryName ) throws LdapException
     {
@@ -159,10 +143,9 @@ public class MaxImmSubFilter implements 
             Dn baseDn = new Dn( opContext.getSession().getDirectoryService().getSchemaManager(), entryName.getRdn( entryName.size() - 1 ) );
             SearchOperationContext searchContext = new SearchOperationContext( opContext.getSession(),
                 baseDn, childrenFilter, childrenSearchControls );
-            searchContext.setByPassed( SEARCH_BYPASS );
             searchContext.setAliasDerefMode( AliasDerefMode.DEREF_ALWAYS );
 
-            results = opContext.getSession().getDirectoryService().getOperationManager().search( searchContext );
+            results = opContext.getSession().getDirectoryService().getPartitionNexus().search( searchContext );
 
             try
             {

Propchange: directory/apacheds/branches/apacheds-txns/interceptors/changelog/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Thu Nov 10 16:21:12 2011
@@ -0,0 +1 @@
+/directory/apacheds/trunk/interceptors/changelog:1183435-1200383

Modified: directory/apacheds/branches/apacheds-txns/interceptors/changelog/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/interceptors/changelog/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/interceptors/changelog/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java (original)
+++ directory/apacheds/branches/apacheds-txns/interceptors/changelog/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java Thu Nov 10 16:21:12 2011
@@ -24,6 +24,7 @@ import java.util.List;
 
 import org.apache.directory.server.constants.ApacheSchemaConstants;
 import org.apache.directory.server.constants.ServerDNConstants;
+import org.apache.directory.server.core.api.CoreSession;
 import org.apache.directory.server.core.api.DirectoryService;
 import org.apache.directory.server.core.api.changelog.ChangeLog;
 import org.apache.directory.server.core.api.entry.ClonedServerEntry;
@@ -32,12 +33,12 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.api.interceptor.NextInterceptor;
 import org.apache.directory.server.core.api.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.DeleteOperationContext;
+import org.apache.directory.server.core.api.interceptor.context.LookupOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.ModifyOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.MoveAndRenameOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.MoveOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.OperationContext;
 import org.apache.directory.server.core.api.interceptor.context.RenameOperationContext;
-import org.apache.directory.server.core.api.partition.ByPassConstants;
 import org.apache.directory.server.core.shared.SchemaService;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.entry.Attribute;
@@ -124,7 +125,7 @@ public class ChangeLogInterceptor extend
         }
         
         LdifEntry reverse = LdifRevertor.reverseAdd( addContext.getDn() );
-        addContext.setChangeLogEvent( changeLog.log( getPrincipal(), forward, reverse ) );
+        addContext.setChangeLogEvent( changeLog.log( getPrincipal( addContext ), forward, reverse ) );
     }
 
 
@@ -132,7 +133,7 @@ public class ChangeLogInterceptor extend
      * The delete operation has to be stored with a way to restore the deleted element.
      * There is no way to do that but reading the entry and dump it into the LOG.
      */
-    public void delete( NextInterceptor next, DeleteOperationContext deleteContext ) throws LdapException
+    public void delete( DeleteOperationContext deleteContext ) throws LdapException
     {
         // @todo make sure we're not putting in operational attributes that cannot be user modified
         // must save the entry if change log is enabled
@@ -143,7 +144,7 @@ public class ChangeLogInterceptor extend
             serverEntry = getAttributes( deleteContext );
         }
 
-        next.delete( deleteContext );
+        next( deleteContext );
 
         if ( !changeLog.isEnabled() )
         {
@@ -176,7 +177,7 @@ public class ChangeLogInterceptor extend
         }
 
         LdifEntry reverse = LdifRevertor.reverseDel( deleteContext.getDn(), reverseEntry );
-        deleteContext.setChangeLogEvent( changeLog.log( getPrincipal(), forward, reverse ) );
+        deleteContext.setChangeLogEvent( changeLog.log( getPrincipal( deleteContext ), forward, reverse ) );
     }
 
 
@@ -199,7 +200,10 @@ public class ChangeLogInterceptor extend
         }
         else
         {
-            serverEntry = opContext.lookup( dn, ByPassConstants.LOOKUP_BYPASS, SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+            CoreSession session = opContext.getSession();
+            LookupOperationContext lookupContext = new LookupOperationContext( session, dn );
+            lookupContext.setAttrsId( SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+            serverEntry = directoryService.getPartitionNexus().lookup( lookupContext  );
         }
 
         return serverEntry;
@@ -278,7 +282,7 @@ public class ChangeLogInterceptor extend
             mods, 
             clientEntry );
         
-        modifyContext.setChangeLogEvent( changeLog.log( getPrincipal(), forward, reverse ) );
+        modifyContext.setChangeLogEvent( changeLog.log( getPrincipal( modifyContext ), forward, reverse ) );
     }
 
 
@@ -315,7 +319,7 @@ public class ChangeLogInterceptor extend
         List<LdifEntry> reverses = LdifRevertor.reverseRename( 
             serverEntry, renameContext.getNewRdn(), renameContext.getDeleteOldRdn() );
         
-        renameContext.setChangeLogEvent( changeLog.log( getPrincipal(), forward, reverses ) );
+        renameContext.setChangeLogEvent( changeLog.log( getPrincipal( renameContext ), forward, reverses ) );
     }
 
 
@@ -354,7 +358,7 @@ public class ChangeLogInterceptor extend
             reversedEntry.addControl( new ManageDsaITImpl() );
         }
         
-        moveAndRenameContext.setChangeLogEvent( changeLog.log( getPrincipal(), forward, reverses ) );
+        moveAndRenameContext.setChangeLogEvent( changeLog.log( getPrincipal( moveAndRenameContext ), forward, reverses ) );
     }
 
 
@@ -376,6 +380,6 @@ public class ChangeLogInterceptor extend
         forward.setNewSuperior( moveContext.getNewSuperior().getName() );
 
         LdifEntry reverse = LdifRevertor.reverseMove(moveContext.getNewSuperior(), moveContext.getDn());
-        moveContext.setChangeLogEvent( changeLog.log( getPrincipal(), forward, reverse ) );
+        moveContext.setChangeLogEvent( changeLog.log( getPrincipal( moveContext ), forward, reverse ) );
     }
 }

Propchange: directory/apacheds/branches/apacheds-txns/interceptors/collective/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Thu Nov 10 16:21:12 2011
@@ -0,0 +1 @@
+/directory/apacheds/trunk/interceptors/collective:1183435-1200383

Modified: directory/apacheds/branches/apacheds-txns/interceptors/collective/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/interceptors/collective/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/interceptors/collective/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java (original)
+++ directory/apacheds/branches/apacheds-txns/interceptors/collective/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java Thu Nov 10 16:21:12 2011
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ * 
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ * 
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ * 
  */
 package org.apache.directory.server.core.collective;
 
@@ -24,6 +24,7 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 
+import org.apache.directory.server.core.api.CoreSession;
 import org.apache.directory.server.core.api.DirectoryService;
 import org.apache.directory.server.core.api.entry.ClonedServerEntry;
 import org.apache.directory.server.core.api.filtering.EntryFilter;
@@ -37,7 +38,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.api.interceptor.context.OperationContext;
 import org.apache.directory.server.core.api.interceptor.context.SearchOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.SearchingOperationContext;
-import org.apache.directory.server.core.api.partition.ByPassConstants;
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.entry.Attribute;
@@ -80,15 +80,15 @@ public class CollectiveAttributeIntercep
         {
             String[] retAttrs = operation.getSearchControls().getReturningAttributes();
             addCollectiveAttributes( operation, entry, retAttrs );
-            
+
             return true;
         }
     }
-    
+
     /** The CollectiveAttribute search filter */
     private final EntryFilter SEARCH_FILTER = new CollectiveAttributeFilter();
 
-    
+
     //-------------------------------------------------------------------------------------
     // Initialization
     //-------------------------------------------------------------------------------------
@@ -98,7 +98,7 @@ public class CollectiveAttributeIntercep
     public void init( DirectoryService directoryService ) throws LdapException
     {
         super.init( directoryService );
-        
+
         LOG.debug( "CollectiveAttribute interceptor initilaized" );
     }
 
@@ -120,13 +120,12 @@ public class CollectiveAttributeIntercep
     /**
      * {@inheritDoc}
      */
-    public EntryFilteringCursor list( NextInterceptor nextInterceptor, ListOperationContext listContext )
-        throws LdapException
+    public EntryFilteringCursor list( ListOperationContext listContext ) throws LdapException
     {
-        EntryFilteringCursor cursor = nextInterceptor.list( listContext );
-        
+        EntryFilteringCursor cursor = next( listContext );
+
         cursor.addEntryFilter( SEARCH_FILTER );
-        
+
         return cursor;
     }
 
@@ -134,9 +133,9 @@ public class CollectiveAttributeIntercep
     /**
      * {@inheritDoc}
      */
-    public Entry lookup( NextInterceptor nextInterceptor, LookupOperationContext lookupContext ) throws LdapException
+    public Entry lookup( LookupOperationContext lookupContext ) throws LdapException
     {
-        Entry result = nextInterceptor.lookup( lookupContext );
+        Entry result = next( lookupContext );
 
         // Adding the collective attributes if any
         if ( ( lookupContext.getAttrsId() == null ) || ( lookupContext.getAttrsId().size() == 0 ) )
@@ -166,11 +165,10 @@ public class CollectiveAttributeIntercep
     /**
      * {@inheritDoc}
      */
-    public EntryFilteringCursor search( NextInterceptor nextInterceptor, SearchOperationContext searchContext )
-        throws LdapException
+    public EntryFilteringCursor search( NextInterceptor nextInterceptor, SearchOperationContext searchContext ) throws LdapException
     {
         EntryFilteringCursor cursor = nextInterceptor.search( searchContext );
-        
+
         cursor.addEntryFilter( SEARCH_FILTER );
 
         return cursor;
@@ -200,7 +198,7 @@ public class CollectiveAttributeIntercep
                     return;
                 }
             }
-            
+
             LOG.info( "A CollectiveAttribute subentry *should* have at least one collectiveAttribute" );
             throw new LdapSchemaViolationException( ResultCodeEnum.OBJECT_CLASS_VIOLATION, I18n.err( I18n.ERR_257_COLLECTIVE_SUBENTRY_WITHOUT_COLLECTIVE_AT ) );
         }
@@ -216,7 +214,7 @@ public class CollectiveAttributeIntercep
         }
     }
 
-    
+
     /**
      * Check that we can modify an entry
      */
@@ -224,7 +222,7 @@ public class CollectiveAttributeIntercep
     {
         List<Modification> mods = modifyContext.getModItems();
         Entry originalEntry = modifyContext.getEntry();
-        Entry targetEntry = ( Entry ) SchemaUtils.getTargetEntry( mods, originalEntry );
+        Entry targetEntry = SchemaUtils.getTargetEntry( mods, originalEntry );
 
         // If the modified entry contains the CollectiveAttributeSubentry, then the modification
         // is accepted, no matter what
@@ -245,7 +243,7 @@ public class CollectiveAttributeIntercep
         }
     }
 
-    
+
     /**
      * Check that we have a CollectiveAttribute in the modifications. (CollectiveAttributes
      * are those with a name starting with 'c-').
@@ -284,7 +282,7 @@ public class CollectiveAttributeIntercep
         return false;
     }
 
-    
+
     /**
      * Check if the entry contains any collective AttributeType (those starting with 'c-')
      */
@@ -303,14 +301,14 @@ public class CollectiveAttributeIntercep
         return false;
     }
 
-    
+
     /**
      * Adds the set of collective attributes requested in the returning attribute list
      * and contained in subentries referenced by the entry. Excludes collective
      * attributes that are specified to be excluded via the 'collectiveExclusions'
      * attribute in the entry.
      *
-     * @param opContext the context of the operation collective attributes 
+     * @param opContext the context of the operation collective attributes
      * are added to
      * @param entry the entry to have the collective attributes injected
      * @param retAttrs array or attribute type to be specifically included in the result entry(s)
@@ -322,7 +320,7 @@ public class CollectiveAttributeIntercep
             COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT );
 
         /*
-         * If there are no collective attribute subentries referenced then we 
+         * If there are no collective attribute subentries referenced then we
          * have no collective attributes to inject to this entry.
          */
         if ( collectiveAttributeSubentries == null )
@@ -331,9 +329,9 @@ public class CollectiveAttributeIntercep
         }
 
         /*
-         * Before we proceed we need to lookup the exclusions within the entry 
-         * and build a set of exclusions for rapid lookup.  We use OID values 
-         * in the exclusions set instead of regular names that may have case 
+         * Before we proceed we need to lookup the exclusions within the entry
+         * and build a set of exclusions for rapid lookup.  We use OID values
+         * in the exclusions set instead of regular names that may have case
          * variance.
          */
         Attribute collectiveExclusions = ( ( ClonedServerEntry ) entry ).getOriginalEntry().get(
@@ -400,13 +398,15 @@ public class CollectiveAttributeIntercep
             Dn subentryDn = opContext.getSession().getDirectoryService().getDnFactory().create( subentryDnStr );
 
             /*
-             * TODO - Instead of hitting disk here can't we leverage the 
+             * TODO - Instead of hitting disk here can't we leverage the
              * SubentryService to get us cached sub-entries so we're not
              * wasting time with a lookup here? It is ridiculous to waste
-             * time looking up this sub-entry. 
+             * time looking up this sub-entry.
              */
 
-            Entry subentry = opContext.lookup( subentryDn, ByPassConstants.LOOKUP_COLLECTIVE_BYPASS, SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+            CoreSession session = opContext.getSession();
+            LookupOperationContext lookupContext = new LookupOperationContext( session, subentryDn, SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+            Entry subentry = session.getDirectoryService().getPartitionNexus().lookup( lookupContext );
 
             for ( Attribute attribute : subentry.getAttributes() )
             {

Propchange: directory/apacheds/branches/apacheds-txns/interceptors/event/
------------------------------------------------------------------------------
    svn:mergeinfo = /directory/apacheds/trunk/interceptors/event:1183435-1200383

Modified: directory/apacheds/branches/apacheds-txns/interceptors/event/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/interceptors/event/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/interceptors/event/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java (original)
+++ directory/apacheds/branches/apacheds-txns/interceptors/event/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java Thu Nov 10 16:21:12 2011
@@ -28,6 +28,7 @@ import java.util.concurrent.ExecutorServ
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
 
+import org.apache.directory.server.core.api.CoreSession;
 import org.apache.directory.server.core.api.DirectoryService;
 import org.apache.directory.server.core.api.entry.ClonedServerEntry;
 import org.apache.directory.server.core.api.event.DirectoryListener;
@@ -40,12 +41,12 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.api.interceptor.NextInterceptor;
 import org.apache.directory.server.core.api.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.DeleteOperationContext;
+import org.apache.directory.server.core.api.interceptor.context.LookupOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.ModifyOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.MoveAndRenameOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.MoveOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.OperationContext;
 import org.apache.directory.server.core.api.interceptor.context.RenameOperationContext;
-import org.apache.directory.server.core.api.partition.ByPassConstants;
 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.exception.LdapException;
@@ -181,10 +182,10 @@ public class EventInterceptor extends Ba
     /**
      * {@inheritDoc}
      */
-    public void delete( NextInterceptor next, final DeleteOperationContext deleteContext ) throws LdapException
+    public void delete( final DeleteOperationContext deleteContext ) throws LdapException
     {
         List<RegistrationEntry> selecting = getSelectingRegistrations( deleteContext.getDn(), deleteContext.getEntry() );
-        next.delete( deleteContext );
+        next( deleteContext );
 
         if ( selecting.isEmpty() )
         {
@@ -218,7 +219,11 @@ public class EventInterceptor extends Ba
         }
 
         // Get the modified entry
-        Entry alteredEntry = modifyContext.lookup( modifyContext.getDn(), ByPassConstants.LOOKUP_BYPASS, SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+        CoreSession session = modifyContext.getSession();
+        LookupOperationContext lookupContext = new LookupOperationContext( session, modifyContext.getDn() );
+        lookupContext.setAttrsId( SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+        
+        Entry alteredEntry = directoryService.getPartitionNexus().lookup( lookupContext );
         modifyContext.setAlteredEntry( alteredEntry );
 
         for ( final RegistrationEntry registration : selecting )
@@ -247,7 +252,11 @@ public class EventInterceptor extends Ba
         }
 
         // Get the modifed entry
-        Entry alteredEntry = renameContext.lookup( renameContext.getNewDn(), ByPassConstants.LOOKUP_BYPASS, SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+        CoreSession session = renameContext.getSession();
+        LookupOperationContext lookupContext = new LookupOperationContext( session, renameContext.getNewDn() );
+        lookupContext.setAttrsId( SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+        
+        Entry alteredEntry = directoryService.getPartitionNexus().lookup( lookupContext );
         renameContext.setModifiedEntry( alteredEntry );
 
         for ( final RegistrationEntry registration : selecting )

Propchange: directory/apacheds/branches/apacheds-txns/interceptors/exception/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Thu Nov 10 16:21:12 2011
@@ -0,0 +1 @@
+/directory/apacheds/trunk/interceptors/exception:1183435-1200383

Modified: directory/apacheds/branches/apacheds-txns/interceptors/exception/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/interceptors/exception/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/interceptors/exception/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java (original)
+++ directory/apacheds/branches/apacheds-txns/interceptors/exception/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java Thu Nov 10 16:21:12 2011
@@ -21,7 +21,7 @@ package org.apache.directory.server.core
 
 
 import org.apache.commons.collections.map.LRUMap;
-import org.apache.directory.server.core.shared.SchemaService;
+import org.apache.directory.server.core.api.CoreSession;
 import org.apache.directory.server.core.api.DirectoryService;
 import org.apache.directory.server.core.api.entry.ClonedServerEntry;
 import org.apache.directory.server.core.api.filtering.BaseEntryFilteringCursor;
@@ -38,9 +38,9 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.api.interceptor.context.MoveOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.OperationContext;
 import org.apache.directory.server.core.api.interceptor.context.RenameOperationContext;
-import org.apache.directory.server.core.api.partition.ByPassConstants;
 import org.apache.directory.server.core.api.partition.Partition;
 import org.apache.directory.server.core.api.partition.PartitionNexus;
+import org.apache.directory.server.core.shared.SchemaService;
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.cursor.EmptyCursor;
@@ -154,7 +154,11 @@ public class ExceptionInterceptor extend
 
             try
             {
-                attrs = addContext.lookup( parentDn, ByPassConstants.LOOKUP_BYPASS, SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+                CoreSession session = addContext.getSession();
+                LookupOperationContext lookupContext = new LookupOperationContext( session, parentDn );
+                lookupContext.setAttrsId( SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+
+                attrs = directoryService.getPartitionNexus().lookup( lookupContext );
             }
             catch ( Exception e )
             {
@@ -190,7 +194,7 @@ public class ExceptionInterceptor extend
      * Checks to make sure the entry being deleted exists, and has no children, otherwise throws the appropriate
      * LdapException.
      */
-    public void delete( NextInterceptor nextInterceptor, DeleteOperationContext deleteContext ) throws LdapException
+    public void delete( DeleteOperationContext deleteContext ) throws LdapException
     {
         Dn dn = deleteContext.getDn();
 
@@ -200,7 +204,7 @@ public class ExceptionInterceptor extend
                 subschemSubentryDn ) );
         }
 
-        nextInterceptor.delete( deleteContext );
+        next( deleteContext );
 
         // Update the alias cache
         synchronized ( notAliasCache )
@@ -214,10 +218,9 @@ public class ExceptionInterceptor extend
 
 
     /**
-     * Checks to see the base being searched exists, otherwise throws the appropriate LdapException.
+     * {@inheritDoc}
      */
-    public EntryFilteringCursor list( NextInterceptor nextInterceptor, ListOperationContext listContext )
-        throws LdapException
+    public EntryFilteringCursor list( ListOperationContext listContext ) throws LdapException
     {
         if ( listContext.getDn().getNormName().equals( subschemSubentryDn.getNormName() ) )
         {
@@ -229,14 +232,14 @@ public class ExceptionInterceptor extend
         //String msg = "Attempt to search under non-existant entry: ";
         //assertHasEntry( listContext, msg, listContext.getDn() );
 
-        return nextInterceptor.list( listContext );
+        return next( listContext );
     }
 
 
     /**
      * Checks to see the base being searched exists, otherwise throws the appropriate LdapException.
      */
-    public Entry lookup( NextInterceptor nextInterceptor, LookupOperationContext lookupContext ) throws LdapException
+    public Entry lookup( LookupOperationContext lookupContext ) throws LdapException
     {
         Dn dn = lookupContext.getDn();
 
@@ -248,7 +251,7 @@ public class ExceptionInterceptor extend
             return serverEntry;
         }
 
-        Entry result = nextInterceptor.lookup( lookupContext );
+        Entry result = next( lookupContext );
 
         return result;
     }
@@ -307,7 +310,7 @@ public class ExceptionInterceptor extend
         // check to see if target entry exists
         Dn newDn = renameContext.getNewDn();
 
-        if ( nextInterceptor.hasEntry( new EntryOperationContext( renameContext.getSession(), newDn ) ) )
+        if ( nexus.hasEntry( new EntryOperationContext( renameContext.getSession(), newDn ) ) )
         {
             LdapEntryAlreadyExistsException e;
             e = new LdapEntryAlreadyExistsException( I18n.err( I18n.ERR_250_ENTRY_ALREADY_EXISTS, newDn.getName() ) );
@@ -358,8 +361,7 @@ public class ExceptionInterceptor extend
      * Checks to see the entry being moved exists, and so does its parent, otherwise throws the appropriate
      * LdapException.
      */
-    public void moveAndRename( NextInterceptor nextInterceptor, MoveAndRenameOperationContext moveAndRenameContext )
-        throws LdapException
+    public void moveAndRename( NextInterceptor nextInterceptor, MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
     {
         Dn oldDn = moveAndRenameContext.getDn();
 

Propchange: directory/apacheds/branches/apacheds-txns/interceptors/journal/
------------------------------------------------------------------------------
    svn:mergeinfo = /directory/apacheds/trunk/interceptors/journal:1183435-1200383

Modified: directory/apacheds/branches/apacheds-txns/interceptors/journal/src/main/java/org/apache/directory/server/core/journal/JournalInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/interceptors/journal/src/main/java/org/apache/directory/server/core/journal/JournalInterceptor.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/interceptors/journal/src/main/java/org/apache/directory/server/core/journal/JournalInterceptor.java (original)
+++ directory/apacheds/branches/apacheds-txns/interceptors/journal/src/main/java/org/apache/directory/server/core/journal/JournalInterceptor.java Thu Nov 10 16:21:12 2011
@@ -19,7 +19,6 @@
 package org.apache.directory.server.core.journal;
 
 
-import java.util.Set;
 import java.util.concurrent.atomic.AtomicLong;
 
 import org.apache.directory.server.core.api.DirectoryService;
@@ -30,6 +29,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.api.interceptor.context.ModifyOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.MoveAndRenameOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.MoveOperationContext;
+import org.apache.directory.server.core.api.interceptor.context.OperationContext;
 import org.apache.directory.server.core.api.interceptor.context.RenameOperationContext;
 import org.apache.directory.server.core.api.journal.Journal;
 import org.apache.directory.shared.ldap.model.entry.Attribute;
@@ -89,9 +89,9 @@ public class JournalInterceptor extends 
     /**
      * Log the operation, manage the logs rotations.
      */
-    private void log( long revision, LdifEntry ldif ) throws LdapException
+    private void log( OperationContext opCtx, long revision, LdifEntry ldif ) throws LdapException
     {
-        journal.log( getPrincipal(), revision, ldif );
+        journal.log( getPrincipal( opCtx ), revision, ldif );
     }
     
     
@@ -122,7 +122,7 @@ public class JournalInterceptor extends 
                 ldif.addAttribute( addEntry.get( attributeType).clone() );
             }
             
-            log( opRevision, ldif );
+            log( addContext, opRevision, ldif );
         }
 
         try
@@ -151,7 +151,7 @@ public class JournalInterceptor extends 
     /**
      * {@inheritDoc}
      */
-    public void delete( NextInterceptor next, DeleteOperationContext deleteContext ) throws LdapException
+    public void delete( DeleteOperationContext deleteContext ) throws LdapException
     {
         long opRevision = 0;
         
@@ -164,12 +164,12 @@ public class JournalInterceptor extends 
             ldif.setChangeType( ChangeType.Delete );
             ldif.setDn( deleteContext.getDn() );
             
-            journal.log( getPrincipal(), opRevision, ldif );
+            journal.log( getPrincipal( deleteContext ), opRevision, ldif );
         }
 
         try
         {
-            next.delete( deleteContext );
+            next( deleteContext );
 
             if ( journalEnabled )
             {
@@ -212,7 +212,7 @@ public class JournalInterceptor extends 
                 ldif.addModification( modification );
             }
             
-            journal.log( getPrincipal(), opRevision, ldif );
+            journal.log( getPrincipal( modifyContext ), opRevision, ldif );
         }
         
         try
@@ -255,7 +255,7 @@ public class JournalInterceptor extends 
             ldif.setNewRdn( renameContext.getNewRdn().getNormName() );
             ldif.setDeleteOldRdn( renameContext.getDeleteOldRdn() );
             
-            journal.log( getPrincipal(), opRevision, ldif );
+            journal.log( getPrincipal( renameContext ), opRevision, ldif );
         }
         
         try
@@ -301,7 +301,7 @@ public class JournalInterceptor extends 
             ldif.setDeleteOldRdn( moveAndRenameContext.getDeleteOldRdn() );
             ldif.setNewSuperior( moveAndRenameContext.getNewDn().getNormName() );
             
-            journal.log( getPrincipal(), opRevision, ldif );
+            journal.log( getPrincipal( moveAndRenameContext ), opRevision, ldif );
         }
         
         try
@@ -344,7 +344,7 @@ public class JournalInterceptor extends 
             ldif.setDn( moveContext.getDn() );
             ldif.setNewSuperior( moveContext.getNewSuperior().getNormName() );
             
-            journal.log( getPrincipal(), opRevision, ldif );
+            journal.log( getPrincipal( moveContext ), opRevision, ldif );
         }
         
         try

Propchange: directory/apacheds/branches/apacheds-txns/interceptors/logger/
------------------------------------------------------------------------------
    svn:mergeinfo = /directory/apacheds/trunk/interceptors/logger:1183435-1200383

Modified: directory/apacheds/branches/apacheds-txns/interceptors/logger/src/main/java/org/apache/directory/server/core/logger/TimerInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/interceptors/logger/src/main/java/org/apache/directory/server/core/logger/TimerInterceptor.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/interceptors/logger/src/main/java/org/apache/directory/server/core/logger/TimerInterceptor.java (original)
+++ directory/apacheds/branches/apacheds-txns/interceptors/logger/src/main/java/org/apache/directory/server/core/logger/TimerInterceptor.java Thu Nov 10 16:21:12 2011
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ * 
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ * 
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ * 
  */
 package org.apache.directory.server.core.logger;
 
@@ -24,7 +24,7 @@ import java.util.concurrent.atomic.Atomi
 
 import org.apache.directory.server.core.api.DirectoryService;
 import org.apache.directory.server.core.api.filtering.EntryFilteringCursor;
-import org.apache.directory.server.core.api.interceptor.Interceptor;
+import org.apache.directory.server.core.api.interceptor.BaseInterceptor;
 import org.apache.directory.server.core.api.interceptor.NextInterceptor;
 import org.apache.directory.server.core.api.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.BindOperationContext;
@@ -48,8 +48,8 @@ import org.slf4j.LoggerFactory;
 /**
  * An interceptor used to log times to process each operation.
  * 
- * The way it works is that it gathers the time to process an operation 
- * into a global counter, which is logged every 1000 operations (when 
+ * The way it works is that it gathers the time to process an operation
+ * into a global counter, which is logged every 1000 operations (when
  * using the OPERATION_STATS logger). It's also possible to get the time for
  * each single operation if activating the OPERATION_TIME logger.
  * 
@@ -57,7 +57,7 @@ import org.slf4j.LoggerFactory;
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class TimerInterceptor implements Interceptor
+public class TimerInterceptor extends BaseInterceptor
 {
     /** A aggregating logger */
     private static final Logger OPERATION_STATS = LoggerFactory.getLogger( "OPERATION_STATS" );
@@ -71,7 +71,7 @@ public class TimerInterceptor implements
 
     /** The Logger's name */
     private String name;
-    
+
     /** Stats for the add operation */
     private static AtomicLong totalAdd = new AtomicLong( 0 );
     private static AtomicInteger nbAddCalls = new AtomicInteger( 0 );
@@ -87,11 +87,11 @@ public class TimerInterceptor implements
     /** Stats for the delete operation */
     private static AtomicLong totalDelete = new AtomicLong( 0 );
     private static AtomicInteger nbDeleteCalls = new AtomicInteger( 0 );
-    
+
     /** Stats for the GetRootDSE operation */
     private static AtomicLong totalGetRootDSE = new AtomicLong( 0 );
     private static AtomicInteger nbGetRootDSECalls = new AtomicInteger( 0 );
-    
+
     /** Stats for the HasEntry operation */
     private static AtomicLong totalHasEntry = new AtomicLong( 0 );
     private static AtomicInteger nbHasEntryCalls = new AtomicInteger( 0 );
@@ -99,35 +99,35 @@ public class TimerInterceptor implements
     /** Stats for the list operation */
     private static AtomicLong totalList = new AtomicLong( 0 );
     private static AtomicInteger nbListCalls = new AtomicInteger( 0 );
-    
+
     /** Stats for the lookup operation */
     private static AtomicLong totalLookup = new AtomicLong( 0 );
     private static AtomicInteger nbLookupCalls = new AtomicInteger( 0 );
-    
+
     /** Stats for the modify operation */
     private static AtomicLong totalModify = new AtomicLong( 0 );
     private static AtomicInteger nbModifyCalls = new AtomicInteger( 0 );
-    
+
     /** Stats for the move operation */
     private static AtomicLong totalMove = new AtomicLong( 0 );
     private static AtomicInteger nbMoveCalls = new AtomicInteger( 0 );
-    
+
     /** Stats for the moveAndRename operation */
     private static AtomicLong totalMoveAndRename = new AtomicLong( 0 );
     private static AtomicInteger nbMoveAndRenameCalls = new AtomicInteger( 0 );
-    
+
     /** Stats for the rename operation */
     private static AtomicLong totalRename = new AtomicLong( 0 );
     private static AtomicInteger nbRenameCalls = new AtomicInteger( 0 );
-    
+
     /** Stats for the search operation */
     private static AtomicLong totalSearch = new AtomicLong( 0 );
     private static AtomicInteger nbSearchCalls = new AtomicInteger( 0 );
-    
+
     /** Stats for the unbind operation */
     private static AtomicLong totalUnbind = new AtomicLong( 0 );
     private static AtomicInteger nbUnbindCalls = new AtomicInteger( 0 );
-    
+
     /**
      * 
      * Creates a new instance of TimerInterceptor.
@@ -138,8 +138,8 @@ public class TimerInterceptor implements
     {
         this.name = name;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
@@ -153,7 +153,7 @@ public class TimerInterceptor implements
         {
             nbAddCalls.incrementAndGet();
             totalAdd.getAndAdd( delta );
-    
+
             if ( nbAddCalls.get() % 1000 == 0 )
             {
                 long average = totalAdd.get()/(nbAddCalls.get() * 1000);
@@ -174,14 +174,14 @@ public class TimerInterceptor implements
     public void bind( NextInterceptor next, BindOperationContext bindContext ) throws LdapException
     {
         long t0 = System.nanoTime();
-        next.bind( bindContext );
+        next( bindContext );
         long delta = System.nanoTime() - t0;
-        
+
         if ( IS_DEBUG_STATS )
         {
             nbBindCalls.incrementAndGet();
             totalBind.getAndAdd( delta );
-    
+
             if ( nbBindCalls.get() % 1000 == 0 )
             {
                 long average = totalBind.get()/(nbBindCalls.get() * 1000);
@@ -199,17 +199,17 @@ public class TimerInterceptor implements
     /**
      * {@inheritDoc}
      */
-    public boolean compare( NextInterceptor next, CompareOperationContext compareContext ) throws LdapException
+    public boolean compare( CompareOperationContext compareContext ) throws LdapException
     {
         long t0 = System.nanoTime();
-        boolean compare = next.compare( compareContext );
+        boolean compare = next( compareContext );
         long delta = System.nanoTime() - t0;
-        
+
         if ( IS_DEBUG_STATS )
         {
             nbCompareCalls.incrementAndGet();
             totalCompare.getAndAdd( delta );
-    
+
             if ( nbCompareCalls.get() % 1000 == 0 )
             {
                 long average = totalCompare.get()/(nbCompareCalls.get() * 1000);
@@ -221,7 +221,7 @@ public class TimerInterceptor implements
         {
             OPERATION_TIME.debug( "{} : Delta compare = {}", name, delta );
         }
-        
+
         return compare;
     }
 
@@ -229,17 +229,17 @@ public class TimerInterceptor implements
     /**
      * {@inheritDoc}
      */
-    public void delete( NextInterceptor next, DeleteOperationContext deleteContext ) throws LdapException
+    public void delete( DeleteOperationContext deleteContext ) throws LdapException
     {
         long t0 = System.nanoTime();
-        next.delete( deleteContext );
+        next( deleteContext );
         long delta = System.nanoTime() - t0;
-        
+
         if ( IS_DEBUG_STATS )
         {
             nbDeleteCalls.incrementAndGet();
             totalDelete.getAndAdd( delta );
-    
+
             if ( nbDeleteCalls.get() % 1000 == 0 )
             {
                 long average = totalDelete.get()/(nbDeleteCalls.get() * 1000);
@@ -261,7 +261,7 @@ public class TimerInterceptor implements
     {
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -274,18 +274,17 @@ public class TimerInterceptor implements
     /**
      * {@inheritDoc}
      */
-    public Entry getRootDSE( NextInterceptor next, GetRootDSEOperationContext getRootDseContext )
-        throws LdapException
+    public Entry getRootDSE( GetRootDSEOperationContext getRootDseContext ) throws LdapException
     {
         long t0 = System.nanoTime();
-        Entry rootDSE = next.getRootDSE( getRootDseContext );
+        Entry rootDSE = next( getRootDseContext );
         long delta = System.nanoTime() - t0;
-        
+
         if ( IS_DEBUG_STATS )
         {
             nbGetRootDSECalls.incrementAndGet();
             totalGetRootDSE.getAndAdd( delta );
-    
+
             if ( nbGetRootDSECalls.get() % 1000 == 0 )
             {
                 long average = totalGetRootDSE.get()/(nbGetRootDSECalls.get() * 1000);
@@ -297,7 +296,7 @@ public class TimerInterceptor implements
         {
             OPERATION_TIME.debug( "{} : Delta getRootDSE = {}", name, delta );
         }
-        
+
         return rootDSE;
     }
 
@@ -305,17 +304,17 @@ public class TimerInterceptor implements
     /**
      * {@inheritDoc}
      */
-    public boolean hasEntry( NextInterceptor next, EntryOperationContext hasEntryContext ) throws LdapException
+    public boolean hasEntry( EntryOperationContext hasEntryContext ) throws LdapException
     {
         long t0 = System.nanoTime();
-        boolean hasEntry = next.hasEntry( hasEntryContext );
+        boolean hasEntry = next( hasEntryContext );
         long delta = System.nanoTime() - t0;
-        
+
         if ( IS_DEBUG_STATS )
         {
             nbHasEntryCalls.incrementAndGet();
             totalHasEntry.getAndAdd( delta );
-    
+
             if ( nbHasEntryCalls.get() % 1000 == 0 )
             {
                 long average = totalHasEntry.get()/(nbHasEntryCalls.get() * 1000);
@@ -327,11 +326,11 @@ public class TimerInterceptor implements
         {
             OPERATION_TIME.debug( "{} : Delta hasEntry = {}", name, delta );
         }
-        
+
         return hasEntry;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -343,17 +342,17 @@ public class TimerInterceptor implements
     /**
      * {@inheritDoc}
      */
-    public EntryFilteringCursor list( NextInterceptor next, ListOperationContext listContext ) throws LdapException
+    public EntryFilteringCursor list( ListOperationContext listContext ) throws LdapException
     {
         long t0 = System.nanoTime();
-        EntryFilteringCursor cursor = next.list( listContext );
+        EntryFilteringCursor cursor = next( listContext );
         long delta = System.nanoTime() - t0;
-        
+
         if ( IS_DEBUG_STATS )
         {
             nbListCalls.incrementAndGet();
             totalList.getAndAdd( delta );
-    
+
             if ( nbListCalls.get() % 1000 == 0 )
             {
                 long average = totalList.get()/(nbListCalls.get() * 1000);
@@ -365,7 +364,7 @@ public class TimerInterceptor implements
         {
             OPERATION_TIME.debug( "{} : Delta list = {}", name, delta );
         }
-        
+
         return cursor;
     }
 
@@ -373,24 +372,24 @@ public class TimerInterceptor implements
     /**
      * {@inheritDoc}
      */
-    public Entry lookup( NextInterceptor next, LookupOperationContext lookupContext ) throws LdapException
+    public Entry lookup( LookupOperationContext lookupContext ) throws LdapException
     {
         long t0 = System.nanoTime();
-        Entry entry = next.lookup( lookupContext );
+        Entry entry = next( lookupContext );
         long delta = System.nanoTime() - t0;
-        
+
         if ( IS_DEBUG_STATS )
         {
             nbLookupCalls.incrementAndGet();
             totalLookup.getAndAdd( delta );
-    
+
             if ( nbLookupCalls.get() % 1000 == 0 )
             {
                 long average = totalLookup.get()/(nbLookupCalls.get() * 1000);
                 OPERATION_STATS.debug( name + " : Average lookup = {} microseconds, nb lookups = {}", average, nbLookupCalls.get() );
             }
         }
-        
+
         if ( IS_DEBUG_TIME )
         {
             OPERATION_TIME.debug( "{} : Delta lookup = {}", name, delta );
@@ -408,12 +407,12 @@ public class TimerInterceptor implements
         long t0 = System.nanoTime();
         next.modify( modifyContext );
         long delta = System.nanoTime() - t0;
-        
+
         if ( IS_DEBUG_STATS )
         {
             nbModifyCalls.incrementAndGet();
             totalModify.getAndAdd( delta );
-    
+
             if ( nbModifyCalls.get() % 1000 == 0 )
             {
                 long average = totalModify.get()/(nbModifyCalls.get() * 1000);
@@ -436,12 +435,12 @@ public class TimerInterceptor implements
         long t0 = System.nanoTime();
         next.move( moveContext );
         long delta = System.nanoTime() - t0;
-        
+
         if ( IS_DEBUG_STATS )
         {
             nbMoveCalls.incrementAndGet();
             totalMove.getAndAdd( delta );
-    
+
             if ( nbMoveCalls.get() % 1000 == 0 )
             {
                 long average = totalMove.get()/(nbMoveCalls.get() * 1000);
@@ -464,12 +463,12 @@ public class TimerInterceptor implements
         long t0 = System.nanoTime();
         next.moveAndRename( moveAndRenameContext );
         long delta = System.nanoTime() - t0;
-        
+
         if ( IS_DEBUG_STATS )
         {
             nbMoveAndRenameCalls.incrementAndGet();
             totalMoveAndRename.getAndAdd( delta );
-    
+
             if ( nbMoveAndRenameCalls.get() % 1000 == 0 )
             {
                 long average = totalMoveAndRename.get()/(nbMoveAndRenameCalls.get() * 1000);
@@ -492,12 +491,12 @@ public class TimerInterceptor implements
         long t0 = System.nanoTime();
         next.rename( renameContext );
         long delta = System.nanoTime() - t0;
-        
+
         if ( IS_DEBUG_STATS )
         {
             nbRenameCalls.incrementAndGet();
             totalRename.getAndAdd( delta );
-    
+
             if ( nbRenameCalls.get() % 1000 == 0 )
             {
                 long average = totalRename.get()/(nbRenameCalls.get() * 1000);
@@ -520,12 +519,12 @@ public class TimerInterceptor implements
         long t0 = System.nanoTime();
         EntryFilteringCursor cursor = next.search( searchContext );
         long delta = System.nanoTime() - t0;
-        
+
         if ( IS_DEBUG_STATS )
         {
             nbSearchCalls.incrementAndGet();
             totalSearch.getAndAdd( delta );
-    
+
             if ( nbSearchCalls.get() % 1000 == 0 )
             {
                 long average = totalSearch.get()/(nbSearchCalls.get() * 1000);
@@ -537,7 +536,7 @@ public class TimerInterceptor implements
         {
             OPERATION_TIME.debug( "{} : Delta search = {}", name, delta );
         }
-        
+
         return cursor;
     }
 
@@ -545,17 +544,17 @@ public class TimerInterceptor implements
     /**
      * {@inheritDoc}
      */
-    public void unbind( NextInterceptor next, UnbindOperationContext unbindContext ) throws LdapException
+    public void unbind( UnbindOperationContext unbindContext ) throws LdapException
     {
         long t0 = System.nanoTime();
-        next.unbind( unbindContext );
+        next( unbindContext );
         long delta = System.nanoTime() - t0;
-        
+
         if ( IS_DEBUG_STATS )
         {
             nbUnbindCalls.incrementAndGet();
             totalUnbind.getAndAdd( delta );
-    
+
             if ( nbUnbindCalls.get() % 1000 == 0 )
             {
                 long average = totalUnbind.get()/(nbUnbindCalls.get() * 1000);

Propchange: directory/apacheds/branches/apacheds-txns/interceptors/normalization/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Thu Nov 10 16:21:12 2011
@@ -0,0 +1 @@
+/directory/apacheds/trunk/interceptors/normalization:1183435-1200383

Modified: directory/apacheds/branches/apacheds-txns/interceptors/normalization/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/interceptors/normalization/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/interceptors/normalization/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java (original)
+++ directory/apacheds/branches/apacheds-txns/interceptors/normalization/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java Thu Nov 10 16:21:12 2011
@@ -119,7 +119,7 @@ public class NormalizationInterceptor ex
     /**
      * {@inheritDoc}
      */
-    public void delete( NextInterceptor nextInterceptor, DeleteOperationContext deleteContext ) throws LdapException
+    public void delete( DeleteOperationContext deleteContext ) throws LdapException
     {
         Dn dn = deleteContext.getDn();
 
@@ -128,7 +128,7 @@ public class NormalizationInterceptor ex
             dn.apply( schemaManager );
         }
 
-        nextInterceptor.delete( deleteContext );
+        next( deleteContext );
     }
 
 
@@ -150,7 +150,7 @@ public class NormalizationInterceptor ex
                 modification.apply( attributeType );
             }
         }
-        
+
         nextInterceptor.modify( modifyContext );
     }
 
@@ -216,8 +216,7 @@ public class NormalizationInterceptor ex
     /**
      * {@inheritDoc}
      */
-    public void moveAndRename( NextInterceptor nextInterceptor, MoveAndRenameOperationContext moveAndRenameContext )
-        throws LdapException
+    public void moveAndRename( NextInterceptor nextInterceptor, MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
     {
 
         if ( !moveAndRenameContext.getNewRdn().isSchemaAware() )
@@ -247,8 +246,7 @@ public class NormalizationInterceptor ex
     /**
      * {@inheritDoc}
      */
-    public EntryFilteringCursor search( NextInterceptor nextInterceptor, SearchOperationContext searchContext )
-        throws LdapException
+    public EntryFilteringCursor search( NextInterceptor nextInterceptor, SearchOperationContext searchContext ) throws LdapException
     {
         Dn dn = searchContext.getDn();
 
@@ -286,21 +284,22 @@ public class NormalizationInterceptor ex
     /**
      * {@inheritDoc}
      */
-    public boolean hasEntry( NextInterceptor nextInterceptor, EntryOperationContext hasEntryContext ) throws LdapException
+    public boolean hasEntry( EntryOperationContext hasEntryContext ) throws LdapException
     {
         hasEntryContext.getDn().apply( schemaManager );
-        return nextInterceptor.hasEntry( hasEntryContext );
+
+        return next( hasEntryContext );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public EntryFilteringCursor list( NextInterceptor nextInterceptor, ListOperationContext listContext )
-        throws LdapException
+    public EntryFilteringCursor list( ListOperationContext listContext ) throws LdapException
     {
         listContext.getDn().apply( schemaManager );
-        return nextInterceptor.list( listContext );
+
+        return next( listContext );
     }
 
 
@@ -330,7 +329,7 @@ public class NormalizationInterceptor ex
     /**
      * {@inheritDoc}
      */
-    public Entry lookup( NextInterceptor nextInterceptor, LookupOperationContext lookupContext ) throws LdapException
+    public Entry lookup( LookupOperationContext lookupContext ) throws LdapException
     {
         lookupContext.getDn().apply( schemaManager );
 
@@ -342,7 +341,7 @@ public class NormalizationInterceptor ex
             lookupContext.setAttrsId( normalizeAttrsId( lookupContext.getAttrsIdArray() ) );
         }
 
-        return nextInterceptor.lookup( lookupContext );
+        return next( lookupContext );
     }
 
 
@@ -352,7 +351,7 @@ public class NormalizationInterceptor ex
     /**
      * {@inheritDoc}
      */
-    public boolean compare( NextInterceptor next, CompareOperationContext compareContext ) throws LdapException
+    public boolean compare( CompareOperationContext compareContext ) throws LdapException
     {
         if ( !compareContext.getDn().isSchemaAware() )
         {
@@ -378,17 +377,17 @@ public class NormalizationInterceptor ex
             throw new LdapInvalidAttributeTypeException( I18n.err( I18n.ERR_266, compareContext.getOid() ) );
         }
 
-        return next.compare( compareContext );
+        return next( compareContext );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void bind( NextInterceptor next, BindOperationContext bindContext ) throws LdapException
+    public void bind( BindOperationContext bindContext ) throws LdapException
     {
         bindContext.getDn().apply( schemaManager );
-        next.bind( bindContext );
+        next( bindContext );
     }
 
 

Propchange: directory/apacheds/branches/apacheds-txns/interceptors/operational/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Thu Nov 10 16:21:12 2011
@@ -0,0 +1 @@
+/directory/apacheds/trunk/interceptors/operational:1183435-1200383

Modified: directory/apacheds/branches/apacheds-txns/interceptors/operational/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/interceptors/operational/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/interceptors/operational/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java (original)
+++ directory/apacheds/branches/apacheds-txns/interceptors/operational/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java Thu Nov 10 16:21:12 2011
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ * 
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ * 
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ * 
  */
 package org.apache.directory.server.core.operational;
 
@@ -106,10 +106,10 @@ public class OperationalAttributeInterce
         public boolean accept( SearchingOperationContext operation, Entry entry ) throws Exception
         {
             return operation.getSearchControls().getReturningAttributes() != null
-            || filterOperationalAttributes( entry );
+                || filterOperationalAttributes( entry );
         }
     }
-    
+
     private final EntryFilter SEARCH_FILTER = new OperationalAttributeSearchFilter();
 
     /** The subschemasubentry Dn */
@@ -178,11 +178,11 @@ public class OperationalAttributeInterce
      * - creatorsName
      * - createTimestamp
      * - entryCSN
-     * - entryUUID 
+     * - entryUUID
      */
     public void add( NextInterceptor nextInterceptor, AddOperationContext addContext ) throws LdapException
     {
-        String principal = getPrincipal().getName();
+        String principal = getPrincipal( addContext ).getName();
 
         Entry entry = addContext.getEntry();
 
@@ -249,7 +249,8 @@ public class OperationalAttributeInterce
         boolean modifierAtPresent = false;
         boolean modifiedTimeAtPresent = false;
         boolean entryCsnAtPresent = false;
-        
+        Dn dn = modifyContext.getDn();
+
         for ( Modification modification : mods )
         {
             AttributeType attributeType = modification.getAttribute().getAttributeType();
@@ -304,36 +305,40 @@ public class OperationalAttributeInterce
             }
         }
 
-        if ( !modifierAtPresent )
+        // Add the modification AT only if we are not trying to modify the SubentrySubschema
+        if ( !dn.equals( subschemaSubentryDn ) )
         {
-            // Inject the ModifiersName AT if it's not present
-            Attribute attribute = new DefaultAttribute( MODIFIERS_NAME_AT, getPrincipal()
-                .getName() );
+            if ( !modifierAtPresent )
+            {
+                // Inject the ModifiersName AT if it's not present
+                Attribute attribute = new DefaultAttribute( MODIFIERS_NAME_AT, getPrincipal( modifyContext )
+                    .getName() );
 
-            Modification modifiersName = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, attribute );
+                Modification modifiersName = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, attribute );
 
-            mods.add( modifiersName );
-        }
+                mods.add( modifiersName );
+            }
 
-        if ( !modifiedTimeAtPresent )
-        {
-            // Inject the ModifyTimestamp AT if it's not present
-            Attribute attribute = new DefaultAttribute( MODIFY_TIMESTAMP_AT, DateUtils
-                .getGeneralizedTime() );
+            if ( !modifiedTimeAtPresent )
+            {
+                // Inject the ModifyTimestamp AT if it's not present
+                Attribute attribute = new DefaultAttribute( MODIFY_TIMESTAMP_AT, DateUtils
+                    .getGeneralizedTime() );
 
-            Modification timestamp = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, attribute );
+                Modification timestamp = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, attribute );
 
-            mods.add( timestamp );
-        }
+                mods.add( timestamp );
+            }
 
-        if ( !entryCsnAtPresent )
-        {
-            String csn = directoryService.getCSN().toString();
-            Attribute attribute = new DefaultAttribute( ENTRY_CSN_AT, csn );
-            Modification updatedCsn = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, attribute );
-            mods.add( updatedCsn );
+            if ( !entryCsnAtPresent )
+            {
+                String csn = directoryService.getCSN().toString();
+                Attribute attribute = new DefaultAttribute( ENTRY_CSN_AT, csn );
+                Modification updatedCsn = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, attribute );
+                mods.add( updatedCsn );
+            }
         }
-        
+
         // Go down in the chain
         nextInterceptor.modify( modifyContext );
     }
@@ -342,11 +347,11 @@ public class OperationalAttributeInterce
     public void rename( NextInterceptor nextInterceptor, RenameOperationContext renameContext ) throws LdapException
     {
         Entry entry = ( ( ClonedServerEntry ) renameContext.getEntry() ).getClonedEntry();
-        entry.put( SchemaConstants.MODIFIERS_NAME_AT, getPrincipal().getName() );
+        entry.put( SchemaConstants.MODIFIERS_NAME_AT, getPrincipal( renameContext ).getName() );
         entry.put( SchemaConstants.MODIFY_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
 
         Entry modifiedEntry = renameContext.getOriginalEntry().clone();
-        modifiedEntry.put( SchemaConstants.MODIFIERS_NAME_AT, getPrincipal().getName() );
+        modifiedEntry.put( SchemaConstants.MODIFIERS_NAME_AT, getPrincipal( renameContext ).getName() );
         modifiedEntry.put( SchemaConstants.MODIFY_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
         //modifiedEntry.setDn( renameContext.getNewDn() );
         renameContext.setModifiedEntry( modifiedEntry );
@@ -361,7 +366,7 @@ public class OperationalAttributeInterce
     public void move( NextInterceptor nextInterceptor, MoveOperationContext moveContext ) throws LdapException
     {
         Entry modifiedEntry = moveContext.getOriginalEntry().clone();
-        modifiedEntry.put( SchemaConstants.MODIFIERS_NAME_AT, getPrincipal().getName() );
+        modifiedEntry.put( SchemaConstants.MODIFIERS_NAME_AT, getPrincipal( moveContext ).getName() );
         modifiedEntry.put( SchemaConstants.MODIFY_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
         modifiedEntry.setDn( moveContext.getNewDn() );
         moveContext.setModifiedEntry( modifiedEntry );
@@ -370,11 +375,10 @@ public class OperationalAttributeInterce
     }
 
 
-    public void moveAndRename( NextInterceptor nextInterceptor, MoveAndRenameOperationContext moveAndRenameContext )
-        throws LdapException
+    public void moveAndRename( NextInterceptor nextInterceptor, MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
     {
         Entry modifiedEntry = moveAndRenameContext.getOriginalEntry().clone();
-        modifiedEntry.put( SchemaConstants.MODIFIERS_NAME_AT, getPrincipal().getName() );
+        modifiedEntry.put( SchemaConstants.MODIFIERS_NAME_AT, getPrincipal( moveAndRenameContext ).getName() );
         modifiedEntry.put( SchemaConstants.MODIFY_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
         modifiedEntry.setDn( moveAndRenameContext.getNewDn() );
         moveAndRenameContext.setModifiedEntry( modifiedEntry );
@@ -383,9 +387,9 @@ public class OperationalAttributeInterce
     }
 
 
-    public Entry lookup( NextInterceptor nextInterceptor, LookupOperationContext lookupContext ) throws LdapException
+    public Entry lookup( LookupOperationContext lookupContext ) throws LdapException
     {
-        Entry result = nextInterceptor.lookup( lookupContext );
+        Entry result = next( lookupContext );
 
         if ( lookupContext.getAttrsId() == null )
         {
@@ -397,21 +401,21 @@ public class OperationalAttributeInterce
         }
 
         denormalizeEntryOpAttrs( result );
+
         return result;
     }
 
 
-    public EntryFilteringCursor list( NextInterceptor nextInterceptor, ListOperationContext listContext )
-        throws LdapException
+    public EntryFilteringCursor list( ListOperationContext listContext ) throws LdapException
     {
-        EntryFilteringCursor cursor = nextInterceptor.list( listContext );
+        EntryFilteringCursor cursor = next( listContext );
         cursor.addEntryFilter( SEARCH_FILTER );
+
         return cursor;
     }
 
 
-    public EntryFilteringCursor search( NextInterceptor nextInterceptor, SearchOperationContext searchContext )
-        throws LdapException
+    public EntryFilteringCursor search( NextInterceptor nextInterceptor, SearchOperationContext searchContext ) throws LdapException
     {
         EntryFilteringCursor cursor = nextInterceptor.search( searchContext );
 
@@ -447,7 +451,7 @@ public class OperationalAttributeInterce
         for ( Attribute attribute : attributes.getAttributes() )
         {
             AttributeType attributeType = attribute.getAttributeType();
-            
+
             if ( attributeType.getUsage() != UsageEnum.USER_APPLICATIONS )
             {
                 removedAttributes.add( attributeType );
@@ -550,7 +554,7 @@ public class OperationalAttributeInterce
         for ( int pos = 0; pos < size; pos++ )
         {
             Rdn rdn = dn.getRdn( size - 1 - pos );
-            
+
             if ( rdn.size() == 0 )
             {
                 newDn = newDn.add( new Rdn() );

Propchange: directory/apacheds/branches/apacheds-txns/interceptors/referral/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Thu Nov 10 16:21:12 2011
@@ -0,0 +1 @@
+/directory/apacheds/trunk/interceptors/referral:1183435-1200383

Modified: directory/apacheds/branches/apacheds-txns/interceptors/referral/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/interceptors/referral/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/interceptors/referral/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java (original)
+++ directory/apacheds/branches/apacheds-txns/interceptors/referral/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java Thu Nov 10 16:21:12 2011
@@ -261,10 +261,10 @@ public class ReferralInterceptor extends
      * 
      * If the entry does not exist in the server, we will get a NoSuchObject error
      */
-    public void delete( NextInterceptor next, DeleteOperationContext deleteContext ) throws LdapException
+    public void delete( DeleteOperationContext deleteContext ) throws LdapException
     {
         // First delete the entry into the server
-        next.delete( deleteContext );
+        next( deleteContext );
 
         Entry entry = deleteContext.getEntry();
 

Propchange: directory/apacheds/branches/apacheds-txns/interceptors/schema/
------------------------------------------------------------------------------
    svn:mergeinfo = /directory/apacheds/trunk/interceptors/schema:1183435-1200383

Modified: directory/apacheds/branches/apacheds-txns/interceptors/schema/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/interceptors/schema/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/interceptors/schema/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java (original)
+++ directory/apacheds/branches/apacheds-txns/interceptors/schema/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java Thu Nov 10 16:21:12 2011
@@ -300,8 +300,7 @@ public class SchemaInterceptor extends B
      * As a result, we will gather all of these three ObjectClasses in 'inetOrgPerson' ObjectClasse
      * superiors.
      */
-    private void computeOCSuperiors( ObjectClass objectClass, List<ObjectClass> superiors, Set<String> ocSeen )
-        throws LdapException
+    private void computeOCSuperiors( ObjectClass objectClass, List<ObjectClass> superiors, Set<String> ocSeen ) throws LdapException
     {
         List<ObjectClass> parents = objectClass.getSuperiors();
 
@@ -371,11 +370,11 @@ public class SchemaInterceptor extends B
     }
 
 
-    public EntryFilteringCursor list( NextInterceptor nextInterceptor, ListOperationContext listContext )
-        throws LdapException
+    public EntryFilteringCursor list( ListOperationContext listContext ) throws LdapException
     {
-        EntryFilteringCursor cursor = nextInterceptor.list( listContext );
+        EntryFilteringCursor cursor = next( listContext );
         cursor.addEntryFilter( binaryAttributeFilter );
+
         return cursor;
     }
 
@@ -383,7 +382,7 @@ public class SchemaInterceptor extends B
     /**
      * {@inheritDoc}
      */
-    public boolean compare( NextInterceptor next, CompareOperationContext compareContext ) throws LdapException
+    public boolean compare( CompareOperationContext compareContext ) throws LdapException
     {
         if ( IS_DEBUG )
         {
@@ -397,7 +396,7 @@ public class SchemaInterceptor extends B
             throw new LdapInvalidAttributeTypeException( I18n.err( I18n.ERR_266, compareContext.getOid() ) );
         }
 
-        boolean result = next.compare( compareContext );
+        boolean result = next( compareContext );
 
         return result;
     }
@@ -572,9 +571,9 @@ public class SchemaInterceptor extends B
                 }
             }
             else if ( ( filter instanceof SubstringNode ) ||
-                      ( filter instanceof PresenceNode ) ||
-                      ( filter instanceof AssertionNode ) ||
-                      ( filter instanceof ScopeNode ) )
+                ( filter instanceof PresenceNode ) ||
+                ( filter instanceof AssertionNode ) ||
+                ( filter instanceof ScopeNode ) )
             {
                 // Nothing to do
             }
@@ -631,8 +630,7 @@ public class SchemaInterceptor extends B
     }
 
 
-    public EntryFilteringCursor search( NextInterceptor nextInterceptor, SearchOperationContext searchContext )
-        throws LdapException
+    public EntryFilteringCursor search( NextInterceptor nextInterceptor, SearchOperationContext searchContext ) throws LdapException
     {
         Dn base = searchContext.getDn();
         SearchControls searchCtls = searchContext.getSearchControls();
@@ -738,9 +736,9 @@ public class SchemaInterceptor extends B
     /**
      * Search for an entry, using its Dn. Binary attributes and ObjectClass attribute are removed.
      */
-    public Entry lookup( NextInterceptor nextInterceptor, LookupOperationContext lookupContext ) throws LdapException
+    public Entry lookup( LookupOperationContext lookupContext ) throws LdapException
     {
-        Entry result = nextInterceptor.lookup( lookupContext );
+        Entry result = next( lookupContext );
 
         filterBinaryAttributes( result );
 
@@ -1026,7 +1024,7 @@ public class SchemaInterceptor extends B
                 && ( !attributeType.equals( MODIFIERS_NAME_AT )
                     && ( !attributeType.equals( MODIFY_TIMESTAMP_AT ) )
                     && ( !attributeType.equals( ENTRY_CSN_AT ) )
-                && ( !PWD_POLICY_STATE_ATTRIBUTE_TYPES.contains( attributeType ) ) ) )
+                    && ( !PWD_POLICY_STATE_ATTRIBUTE_TYPES.contains( attributeType ) ) ) )
             {
                 String msg = I18n.err( I18n.ERR_52, attributeType );
                 LOG.error( msg );
@@ -1065,7 +1063,7 @@ public class SchemaInterceptor extends B
                         // point, as one of the following modification can change the
                         // ObjectClasses.
                         Attribute newAttribute = attribute.clone();
-                        
+
                         // Check that the attribute allows null values if we don'y have any value
                         if ( ( newAttribute.size() == 0 ) && !newAttribute.isValid( attributeType ) )
                         {
@@ -1216,7 +1214,7 @@ public class SchemaInterceptor extends B
             {
                 AttributeType at = ( ( DefaultModification ) mod ).getAttribute().getAttributeType();
 
-                if ( !MODIFIERS_NAME_AT.equals( at ) && !MODIFY_TIMESTAMP_AT.equals( at ) )
+                if ( !MODIFIERS_NAME_AT.equals( at ) && !MODIFY_TIMESTAMP_AT.equals( at ) && !ENTRY_CSN_AT.equals( at ) )
                 {
                     cleanMods.add( mod );
                 }
@@ -1325,7 +1323,7 @@ public class SchemaInterceptor extends B
         public boolean accept( SearchingOperationContext operation, Entry entry ) throws Exception
         {
             filterBinaryAttributes( entry );
-            
+
             return true;
         }
     }
@@ -1339,7 +1337,7 @@ public class SchemaInterceptor extends B
         public boolean accept( SearchingOperationContext operation, Entry entry ) throws Exception
         {
             filterAttributeTypes( operation, entry );
-            
+
             return true;
         }
     }
@@ -1516,9 +1514,9 @@ public class SchemaInterceptor extends B
 
                 if ( ( schema != null ) && schema.isEnabled() )
                 {
-                    Attribute oidAT = entry.get( MetaSchemaConstants.M_OID_AT );                    
+                    Attribute oidAT = entry.get( MetaSchemaConstants.M_OID_AT );
                     String ocOid = oidAT.getString();
-                    
+
                     ObjectClass addedOC = schemaManager.lookupObjectClassRegistry( ocOid );
                     computeSuperior( addedOC );
                 }
@@ -1544,14 +1542,14 @@ public class SchemaInterceptor extends B
     private String getSchemaName( Dn dn ) throws LdapException
     {
         int size = dn.size();
-        
+
         if ( size < 2 )
         {
             throw new LdapException( I18n.err( I18n.ERR_276 ) );
         }
 
         Rdn rdn = dn.getRdn( size - 2 );
-        
+
         return rdn.getNormValue().getString();
     }
 
@@ -1605,8 +1603,7 @@ public class SchemaInterceptor extends B
     /**
      * Checks to see numbers of values of attributes conforms to the schema
      */
-    private void assertNumberOfAttributeValuesValid( Attribute attribute )
-        throws LdapInvalidAttributeValueException
+    private void assertNumberOfAttributeValuesValid( Attribute attribute ) throws LdapInvalidAttributeValueException
     {
         if ( attribute.size() > 1 && attribute.getAttributeType().isSingleValued() )
         {
@@ -1631,25 +1628,25 @@ public class SchemaInterceptor extends B
             // include AT names for better error reporting
             StringBuilder sb = new StringBuilder();
             sb.append( '[' );
-            
+
             for( String oid: must )
             {
                 String name = schemaManager.getAttributeType( oid ).getName();
                 sb.append( name )
-                  .append( '(' )
-                  .append( oid )
-                  .append( "), " );
+                .append( '(' )
+                .append( oid )
+                .append( "), " );
             }
-            
+
             int end = sb.length();
             sb.replace( end - 2, end, "" ); // remove the trailing ', '
             sb.append( ']' );
-            
+
             throw new LdapSchemaViolationException( ResultCodeEnum.OBJECT_CLASS_VIOLATION, I18n.err( I18n.ERR_279,
                 sb, dn.getName() ) );
         }
     }
-    
+
 
     /**
      * Checck that OC does not conflict :

Modified: directory/apacheds/branches/apacheds-txns/interceptors/schema/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/interceptors/schema/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/interceptors/schema/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java (original)
+++ directory/apacheds/branches/apacheds-txns/interceptors/schema/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java Thu Nov 10 16:21:12 2011
@@ -196,7 +196,7 @@ public class SchemaSubentryModifier
     public void deleteSchemaObject( OperationContext opContext, SchemaObject obj ) throws LdapException
     {
         Dn dn = getDn( obj );
-        opContext.delete( dn, BYPASS );
+        opContext.delete( dn );
     }
 
     
@@ -209,7 +209,7 @@ public class SchemaSubentryModifier
             "cn=" + schemaName, 
             SchemaConstants.OU_SCHEMA );
         
-        opContext.delete( dn, BYPASS );
+        opContext.delete( dn );
     }
 
 
@@ -221,7 +221,7 @@ public class SchemaSubentryModifier
             SchemaConstants.SYNTAX_CHECKERS_PATH,
             "cn=" + schemaName,
             SchemaConstants.OU_SCHEMA );
-        opContext.delete( dn, BYPASS );
+        opContext.delete( dn );
     }
 
 
@@ -234,7 +234,7 @@ public class SchemaSubentryModifier
             "cn=" + schemaName,
             SchemaConstants.OU_SCHEMA );
         
-        opContext.delete( dn, BYPASS );
+        opContext.delete( dn );
     }
 
 

Propchange: directory/apacheds/branches/apacheds-txns/interceptors/subtree/
------------------------------------------------------------------------------
    svn:mergeinfo = /directory/apacheds/trunk/interceptors/subtree:1183435-1200383