You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2008/05/21 21:26:50 UTC

svn commit: r658821 - in /directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core: event/ exception/ interceptor/

Author: akarasulu
Date: Wed May 21 12:26:49 2008
New Revision: 658821

URL: http://svn.apache.org/viewvc?rev=658821&view=rev
Log:
fixing issues with Cursor verses NamingEnumeration usage in Interceptors

Modified:
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java?rev=658821&r1=658820&r2=658821&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java Wed May 21 12:26:49 2008
@@ -63,7 +63,6 @@
 import org.slf4j.LoggerFactory;
 
 import javax.naming.Binding;
-import javax.naming.NamingException;
 import javax.naming.directory.SearchControls;
 import javax.naming.event.EventContext;
 import javax.naming.event.NamespaceChangeListener;
@@ -92,7 +91,7 @@
     private NormalizingVisitor visitor;
 
 
-    public void init( DirectoryService directoryService ) throws NamingException
+    public void init( DirectoryService directoryService ) throws Exception
     {
         super.init( directoryService );
 
@@ -113,10 +112,10 @@
      * @param filter the filter to use for evaluating event triggering
      * @param searchControls the search controls to use when evaluating triggering
      * @param namingListener the naming listener to register
-     * @throws NamingException if there are failures adding the naming listener
+     * @throws Exception if there are failures adding the naming listener
      */
     public void addNamingListener( EventContext ctx, LdapDN name, ExprNode filter, SearchControls searchControls,
-        NamingListener namingListener ) throws NamingException
+        NamingListener namingListener ) throws Exception
     {
         LdapDN normalizedBaseDn = new LdapDN( name );
         normalizedBaseDn.normalize( attributeRegistry.getNormalizerMapping() );
@@ -238,7 +237,7 @@
     }
 
 
-    public void add( NextInterceptor next, AddOperationContext opContext ) throws NamingException
+    public void add( NextInterceptor next, AddOperationContext opContext ) throws Exception
     {
         next.add( opContext );
         //super.add( next, opContext );
@@ -271,7 +270,7 @@
     }
 
 
-    public void delete( NextInterceptor next, DeleteOperationContext opContext ) throws NamingException
+    public void delete( NextInterceptor next, DeleteOperationContext opContext ) throws Exception
     {
         LdapDN name = opContext.getDn();
         ServerEntry entry = nexus.lookup( new LookupOperationContext( opContext.getRegistries(), name ) );
@@ -305,7 +304,7 @@
 
 
     private void notifyOnModify( Registries registries, LdapDN name, List<Modification> mods, ServerEntry oriEntry )
-        throws NamingException
+        throws Exception
     {
         ServerEntry entry = nexus.lookup( new LookupOperationContext( registries, name ) );
         Set<EventSourceRecord> selecting = getSelectingSources( name, entry );
@@ -334,7 +333,7 @@
     }
 
 
-    public void modify( NextInterceptor next, ModifyOperationContext opContext ) throws NamingException
+    public void modify( NextInterceptor next, ModifyOperationContext opContext ) throws Exception
     {
         Invocation invocation = InvocationStack.getInstance().peek();
         PartitionNexusProxy proxy = invocation.getProxy();
@@ -348,7 +347,7 @@
     }
 
 
-    private void notifyOnNameChange( Registries registries, LdapDN oldName, LdapDN newName ) throws NamingException
+    private void notifyOnNameChange( Registries registries, LdapDN oldName, LdapDN newName ) throws Exception
     {
         ServerEntry entry = nexus.lookup( new LookupOperationContext( registries, newName ) );
         Set<EventSourceRecord> selecting = getSelectingSources( oldName, entry );
@@ -377,7 +376,7 @@
     }
 
 
-    public void rename( NextInterceptor next, RenameOperationContext opContext ) throws NamingException
+    public void rename( NextInterceptor next, RenameOperationContext opContext ) throws Exception
     {
         next.rename( opContext );
         //super.rename( next, opContext );
@@ -390,7 +389,7 @@
     }
 
 
-    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext opContext ) throws NamingException
+    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext opContext ) throws Exception
     {
         next.moveAndRename( opContext );
         //super.moveAndRename( next, opContext );
@@ -401,7 +400,7 @@
     }
 
 
-    public void move( NextInterceptor next, MoveOperationContext opContext ) throws NamingException
+    public void move( NextInterceptor next, MoveOperationContext opContext ) throws Exception
     {
         next.move( opContext );
         //super.move( next, opContext );
@@ -414,7 +413,7 @@
     }
 
 
-    Set<EventSourceRecord> getSelectingSources( LdapDN name, ServerEntry entry ) throws NamingException
+    Set<EventSourceRecord> getSelectingSources( LdapDN name, ServerEntry entry ) throws Exception
     {
         if ( sources.isEmpty() )
         {

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java?rev=658821&r1=658820&r2=658821&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java Wed May 21 12:26:49 2008
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.server.core.exception;
 
+
 import org.apache.commons.collections.map.LRUMap;
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.entry.ServerAttribute;
@@ -69,7 +70,7 @@
 /**
  * An {@link org.apache.directory.server.core.interceptor.Interceptor} that detects any operations that breaks integrity
  * of {@link Partition} and terminates the current invocation chain by
- * throwing a {@link NamingException}. Those operations include when an entry
+ * throwing a {@link Exception}. Those operations include when an entry
  * already exists at a DN and is added once again to the same DN.
  *
  * @org.apache.xbean.XBean
@@ -122,7 +123,7 @@
     }
 
 
-    public void init( DirectoryService directoryService ) throws NamingException
+    public void init( DirectoryService directoryService ) throws Exception
     {
         nexus = directoryService.getPartitionNexus();
         normalizerMap = directoryService.getRegistries().getAttributeTypeRegistry().getNormalizerMapping();
@@ -142,7 +143,7 @@
      * does an exception is raised.
      */
     public void add( NextInterceptor nextInterceptor, AddOperationContext opContext )
-        throws NamingException
+        throws Exception
     {
     	LdapDN name = opContext.getDn();
     	
@@ -216,7 +217,7 @@
      * Checks to make sure the entry being deleted exists, and has no children, otherwise throws the appropriate
      * LdapException.
      */
-    public void delete( NextInterceptor nextInterceptor, DeleteOperationContext opContext ) throws NamingException
+    public void delete( NextInterceptor nextInterceptor, DeleteOperationContext opContext ) throws Exception
     {
     	LdapDN name = opContext.getDn();
     	
@@ -265,7 +266,7 @@
     /**
      * Checks to see the base being searched exists, otherwise throws the appropriate LdapException.
      */
-    public NamingEnumeration<ServerSearchResult> list( NextInterceptor nextInterceptor, ListOperationContext opContext ) throws NamingException
+    public NamingEnumeration<ServerSearchResult> list( NextInterceptor nextInterceptor, ListOperationContext opContext ) throws Exception
     {
         if ( opContext.getDn().getNormName().equals( subschemSubentryDn.getNormName() ) )
         {
@@ -284,7 +285,7 @@
     /**
      * Checks to see the base being searched exists, otherwise throws the appropriate LdapException.
      */
-    public ServerEntry lookup( NextInterceptor nextInterceptor, LookupOperationContext opContext ) throws NamingException
+    public ServerEntry lookup( NextInterceptor nextInterceptor, LookupOperationContext opContext ) throws Exception
     {
         if ( opContext.getDn().getNormName().equals( subschemSubentryDn.getNormName() ) )
         {
@@ -303,7 +304,7 @@
      * Checks to see the entry being modified exists, otherwise throws the appropriate LdapException.
      */
     public void modify( NextInterceptor nextInterceptor, ModifyOperationContext opContext )
-        throws NamingException
+        throws Exception
     {
         // check if entry to modify exists
         String msg = "Attempt to modify non-existant entry: ";
@@ -362,7 +363,7 @@
      * Checks to see the entry being renamed exists, otherwise throws the appropriate LdapException.
      */
     public void rename( NextInterceptor nextInterceptor, RenameOperationContext opContext )
-        throws NamingException
+        throws Exception
     {
         LdapDN dn = opContext.getDn();
         
@@ -409,7 +410,7 @@
      * Checks to see the entry being moved exists, and so does its parent, otherwise throws the appropriate
      * LdapException.
      */
-    public void move( NextInterceptor nextInterceptor, MoveOperationContext opContext ) throws NamingException
+    public void move( NextInterceptor nextInterceptor, MoveOperationContext opContext ) throws Exception
     {
         LdapDN oriChildName = opContext.getDn();
         LdapDN newParentName = opContext.getParent();
@@ -465,7 +466,7 @@
      * Checks to see the entry being moved exists, and so does its parent, otherwise throws the appropriate
      * LdapException.
      */
-    public void moveAndRename( NextInterceptor nextInterceptor, MoveAndRenameOperationContext opContext ) throws NamingException
+    public void moveAndRename( NextInterceptor nextInterceptor, MoveAndRenameOperationContext opContext ) throws Exception
     {
         LdapDN oriChildName = opContext.getDn();
         LdapDN parent = opContext.getParent();
@@ -518,7 +519,7 @@
     /**
      * Checks to see the entry being searched exists, otherwise throws the appropriate LdapException.
      */
-    public NamingEnumeration<ServerSearchResult> search( NextInterceptor nextInterceptor, SearchOperationContext opContext ) throws NamingException
+    public NamingEnumeration<ServerSearchResult> search( NextInterceptor nextInterceptor, SearchOperationContext opContext ) throws Exception
     {
         LdapDN base = opContext.getDn();
 
@@ -537,7 +538,7 @@
 
 	        return result;
         }
-        catch ( NamingException ne )
+        catch ( Exception ne )
         {
             String msg = "Attempt to search under non-existant entry: ";
             assertHasEntry( nextInterceptor, msg, base );
@@ -552,10 +553,10 @@
      *
      * @param msg        the message to prefix to the distinguished name for explanation
      * @param dn         the distinguished name of the entry that is asserted
-     * @throws NamingException if the entry does not exist
+     * @throws Exception if the entry does not exist
      * @param nextInterceptor the next interceptor in the chain
      */
-    private void assertHasEntry( NextInterceptor nextInterceptor, String msg, LdapDN dn ) throws NamingException
+    private void assertHasEntry( NextInterceptor nextInterceptor, String msg, LdapDN dn ) throws Exception
     {
         if ( subschemSubentryDn.getNormName().equals( dn.getNormName() ) )
         {

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java?rev=658821&r1=658820&r2=658821&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java Wed May 21 12:26:49 2008
@@ -22,8 +22,8 @@
 
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.authn.LdapPrincipal;
+import org.apache.directory.server.core.cursor.Cursor;
 import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.entry.ServerSearchResult;
 import org.apache.directory.server.core.interceptor.context.AddContextPartitionOperationContext;
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.interceptor.context.BindOperationContext;
@@ -48,7 +48,6 @@
 import org.apache.directory.shared.ldap.name.LdapDN;
 
 import javax.naming.Context;
-import javax.naming.NamingEnumeration;
 import javax.naming.ldap.LdapContext;
 import java.util.Iterator;
 
@@ -161,8 +160,7 @@
     }
 
 
-    public NamingEnumeration<ServerSearchResult> list( NextInterceptor next, ListOperationContext opContext ) 
-        throws Exception
+    public Cursor<ServerEntry> list( NextInterceptor next, ListOperationContext opContext ) throws Exception
     {
         return next.list( opContext );
     }
@@ -206,7 +204,7 @@
     }
 
 
-    public NamingEnumeration<ServerSearchResult> search( NextInterceptor next, SearchOperationContext opContext ) throws Exception
+    public Cursor<ServerEntry> search( NextInterceptor next, SearchOperationContext opContext ) throws Exception
     {
         return next.search( opContext );
     }

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java?rev=658821&r1=658820&r2=658821&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java Wed May 21 12:26:49 2008
@@ -21,8 +21,8 @@
 
 
 import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.cursor.Cursor;
 import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.entry.ServerSearchResult;
 import org.apache.directory.server.core.interceptor.context.AddContextPartitionOperationContext;
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.interceptor.context.BindOperationContext;
@@ -46,7 +46,6 @@
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
-import javax.naming.NamingEnumeration;
 import java.util.Iterator;
 
 
@@ -199,13 +198,13 @@
     /**
      * Filters {@link Partition#list( ListOperationContext )} call.
      */
-    NamingEnumeration<ServerSearchResult> list( NextInterceptor next, ListOperationContext opContext ) throws Exception;
+    Cursor<ServerEntry> list( NextInterceptor next, ListOperationContext opContext ) throws Exception;
 
 
     /**
      * Filters {@link Partition#search( SearchOperationContext )} call.
      */
-    NamingEnumeration<ServerSearchResult> search( NextInterceptor next, SearchOperationContext opContext ) throws Exception;
+    Cursor<ServerEntry> search( NextInterceptor next, SearchOperationContext opContext ) throws Exception;
 
 
     /**

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java?rev=658821&r1=658820&r2=658821&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java Wed May 21 12:26:49 2008
@@ -27,8 +27,8 @@
 import java.util.Map;
 
 import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.cursor.Cursor;
 import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.entry.ServerSearchResult;
 import org.apache.directory.server.core.interceptor.context.AddContextPartitionOperationContext;
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.interceptor.context.BindOperationContext;
@@ -57,8 +57,6 @@
 import org.slf4j.LoggerFactory;
 
 import javax.naming.ConfigurationException;
-import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
 
 
 /**
@@ -96,118 +94,118 @@
         }
 
 
-        public boolean compare( NextInterceptor next, CompareOperationContext opContext ) throws NamingException
+        public boolean compare( NextInterceptor next, CompareOperationContext opContext ) throws Exception
         {
             return nexus.compare( opContext );
         }
 
 
-        public ServerEntry getRootDSE( NextInterceptor next, GetRootDSEOperationContext opContext ) throws NamingException
+        public ServerEntry getRootDSE( NextInterceptor next, GetRootDSEOperationContext opContext ) throws Exception
         {
             return nexus.getRootDSE( opContext );
         }
 
 
-        public LdapDN getMatchedName( NextInterceptor next, GetMatchedNameOperationContext opContext ) throws NamingException
+        public LdapDN getMatchedName( NextInterceptor next, GetMatchedNameOperationContext opContext ) throws Exception
         {
             return ( LdapDN ) nexus.getMatchedName( opContext ).clone();
         }
 
 
-        public LdapDN getSuffix( NextInterceptor next, GetSuffixOperationContext opContext ) throws NamingException
+        public LdapDN getSuffix( NextInterceptor next, GetSuffixOperationContext opContext ) throws Exception
         {
             return ( LdapDN ) nexus.getSuffix( opContext ).clone();
         }
 
 
-        public Iterator<String> listSuffixes( NextInterceptor next, ListSuffixOperationContext opContext ) throws NamingException
+        public Iterator<String> listSuffixes( NextInterceptor next, ListSuffixOperationContext opContext ) throws Exception
         {
             return nexus.listSuffixes( opContext );
         }
 
 
-        public void delete( NextInterceptor next, DeleteOperationContext opContext ) throws NamingException
+        public void delete( NextInterceptor next, DeleteOperationContext opContext ) throws Exception
         {
             nexus.delete( opContext );
         }
 
 
-        public void add( NextInterceptor next, AddOperationContext opContext ) throws NamingException
+        public void add( NextInterceptor next, AddOperationContext opContext ) throws Exception
         {
             nexus.add( opContext );
         }
 
 
-        public void modify( NextInterceptor next, ModifyOperationContext opContext ) throws NamingException
+        public void modify( NextInterceptor next, ModifyOperationContext opContext ) throws Exception
         {
             nexus.modify( opContext );
         }
 
 
-        public NamingEnumeration<ServerSearchResult> list( NextInterceptor next, ListOperationContext opContext ) throws NamingException
+        public Cursor<ServerEntry> list( NextInterceptor next, ListOperationContext opContext ) throws Exception
         {
             return nexus.list( opContext );
         }
 
 
-        public NamingEnumeration<ServerSearchResult> search( NextInterceptor next, SearchOperationContext opContext ) throws NamingException
+        public Cursor<ServerEntry>  search( NextInterceptor next, SearchOperationContext opContext ) throws Exception
         {
             return nexus.search( opContext );
         }
 
 
-        public ServerEntry lookup( NextInterceptor next, LookupOperationContext opContext ) throws NamingException
+        public ServerEntry lookup( NextInterceptor next, LookupOperationContext opContext ) throws Exception
         {
             return ( ServerEntry ) nexus.lookup( opContext ).clone();
         }
 
 
-        public boolean hasEntry( NextInterceptor next, EntryOperationContext opContext ) throws NamingException
+        public boolean hasEntry( NextInterceptor next, EntryOperationContext opContext ) throws Exception
         {
             return nexus.hasEntry( opContext );
         }
 
 
         public void rename( NextInterceptor next, RenameOperationContext opContext )
-            throws NamingException
+            throws Exception
         {
             nexus.rename( opContext );
         }
 
 
-        public void move( NextInterceptor next, MoveOperationContext opContext ) throws NamingException
+        public void move( NextInterceptor next, MoveOperationContext opContext ) throws Exception
         {
             nexus.move( opContext );
         }
 
 
         public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext opContext )
-            throws NamingException
+            throws Exception
         {
             nexus.moveAndRename( opContext );
         }
 
 
         public void addContextPartition( NextInterceptor next, AddContextPartitionOperationContext opContext )
-            throws NamingException
+            throws Exception
         {
             nexus.addContextPartition( opContext );
         }
 
 
-        public void removeContextPartition( NextInterceptor next, RemoveContextPartitionOperationContext opContext ) throws NamingException
+        public void removeContextPartition( NextInterceptor next, RemoveContextPartitionOperationContext opContext ) throws Exception
         {
             nexus.removeContextPartition( opContext );
         }
 
 
-        public void bind( NextInterceptor next, BindOperationContext opContext )  throws NamingException
+        public void bind( NextInterceptor next, BindOperationContext opContext )  throws Exception
         {
             nexus.bind( opContext );
         }
 
 
-        public void unbind( NextInterceptor next, UnbindOperationContext opContext ) throws NamingException
+        public void unbind( NextInterceptor next, UnbindOperationContext opContext ) throws Exception
         {
             nexus.unbind( opContext );
         }
@@ -235,10 +233,10 @@
     /**
      * Initializes and registers all interceptors according to the specified
      * {@link DirectoryService}.
-     * @throws javax.naming.NamingException if an interceptor cannot be initialized.
+     * @throws javax.naming.Exception if an interceptor cannot be initialized.
      * @param directoryService the directory core
      */
-    public synchronized void init( DirectoryService directoryService ) throws NamingException
+    public synchronized void init( DirectoryService directoryService ) throws Exception
     {
         // Initialize tail first.
         this.directoryService = directoryService;
@@ -262,9 +260,9 @@
             // destroy if failed to initialize all interceptors.
             destroy();
 
-            if ( t instanceof NamingException )
+            if ( t instanceof Exception )
             {
-                throw ( NamingException ) t;
+                throw ( Exception ) t;
             }
             else
             {
@@ -343,20 +341,20 @@
     }
 
 
-    public synchronized void addFirst( Interceptor interceptor ) throws NamingException
+    public synchronized void addFirst( Interceptor interceptor ) throws Exception
     {
         register0( interceptor, head );
     }
 
 
-    public synchronized void addLast( Interceptor interceptor ) throws NamingException
+    public synchronized void addLast( Interceptor interceptor ) throws Exception
     {
         register0( interceptor, tail );
     }
 
 
     public synchronized void addBefore( String nextInterceptorName, Interceptor interceptor )
-        throws NamingException
+        throws Exception
     {
         Entry e = name2entry.get( nextInterceptorName );
         if ( e == null )
@@ -367,14 +365,14 @@
     }
 
 
-    public synchronized String remove( String interceptorName ) throws NamingException
+    public synchronized String remove( String interceptorName ) throws Exception
     {
         return deregister( interceptorName );
     }
 
 
     public synchronized void addAfter( String prevInterceptorName, Interceptor interceptor )
-        throws NamingException
+        throws Exception
     {
         Entry e = name2entry.get( prevInterceptorName );
         if ( e == null )
@@ -388,10 +386,10 @@
     /**
      * Adds and initializes an interceptor with the specified configuration.
      * @param interceptor interceptor to add to end of chain
-     * @throws javax.naming.NamingException if there is already an interceptor of this name or the interceptor
+     * @throws javax.naming.Exception if there is already an interceptor of this name or the interceptor
      * cannot be initialized.
      */
-    private void register( Interceptor interceptor ) throws NamingException
+    private void register( Interceptor interceptor ) throws Exception
     {
         checkAddable( interceptor );
         register0( interceptor, tail );
@@ -433,7 +431,7 @@
         return entry.getName();
     }
 
-    private void register0( Interceptor interceptor, Entry nextEntry ) throws NamingException
+    private void register0( Interceptor interceptor, Entry nextEntry ) throws Exception
     {
         String name = interceptor.getName();
 
@@ -536,7 +534,7 @@
     }
 
 
-    public ServerEntry getRootDSE( GetRootDSEOperationContext opContext ) throws NamingException
+    public ServerEntry getRootDSE( GetRootDSEOperationContext opContext ) throws Exception
     {
         Entry entry = getStartingEntry();
         Interceptor head = entry.interceptor;
@@ -546,7 +544,7 @@
         {
             return head.getRootDSE( next, opContext );
         }
-        catch ( NamingException ne )
+        catch ( Exception ne )
         {
             throw ne;
         }
@@ -558,7 +556,7 @@
     }
 
 
-    public LdapDN getMatchedName( GetMatchedNameOperationContext opContext ) throws NamingException
+    public LdapDN getMatchedName( GetMatchedNameOperationContext opContext ) throws Exception
     {
         Entry entry = getStartingEntry();
         Interceptor head = entry.interceptor;
@@ -568,7 +566,7 @@
         {
             return head.getMatchedName( next, opContext );
         }
-        catch ( NamingException ne )
+        catch ( Exception ne )
         {
             throw ne;
         }
@@ -580,7 +578,7 @@
     }
 
 
-    public LdapDN getSuffix( GetSuffixOperationContext opContext ) throws NamingException
+    public LdapDN getSuffix( GetSuffixOperationContext opContext ) throws Exception
     {
         Entry entry = getStartingEntry();
         Interceptor head = entry.interceptor;
@@ -590,7 +588,7 @@
         {
             return head.getSuffix( next, opContext );
         }
-        catch ( NamingException ne )
+        catch ( Exception ne )
         {
             throw ne;
         }
@@ -602,7 +600,7 @@
     }
 
 
-    public boolean compare( CompareOperationContext opContext ) throws NamingException
+    public boolean compare( CompareOperationContext opContext ) throws Exception
     {
         Entry entry = getStartingEntry();
         Interceptor head = entry.interceptor;
@@ -612,7 +610,7 @@
         {
             return head.compare( next, opContext );
         }
-        catch ( NamingException ne )
+        catch ( Exception ne )
         {
             throw ne;
         }
@@ -624,7 +622,7 @@
     }
 
 
-    public Iterator<String> listSuffixes( ListSuffixOperationContext opContext ) throws NamingException
+    public Iterator<String> listSuffixes( ListSuffixOperationContext opContext ) throws Exception
     {
         Entry entry = getStartingEntry();
         Interceptor head = entry.interceptor;
@@ -634,7 +632,7 @@
         {
             return head.listSuffixes( next, opContext );
         }
-        catch ( NamingException ne )
+        catch ( Exception ne )
         {
             throw ne;
         }
@@ -646,7 +644,7 @@
     }
 
 
-    public void addContextPartition( AddContextPartitionOperationContext opContext ) throws NamingException
+    public void addContextPartition( AddContextPartitionOperationContext opContext ) throws Exception
     {
         Entry entry = getStartingEntry();
         Interceptor head = entry.interceptor;
@@ -656,7 +654,7 @@
         {
             head.addContextPartition( next, opContext );
         }
-        catch ( NamingException ne )
+        catch ( Exception ne )
         {
             throw ne;
         }
@@ -668,7 +666,7 @@
     }
 
 
-    public void removeContextPartition( RemoveContextPartitionOperationContext opContext ) throws NamingException
+    public void removeContextPartition( RemoveContextPartitionOperationContext opContext ) throws Exception
     {
         Entry entry = getStartingEntry();
         Interceptor head = entry.interceptor;
@@ -678,7 +676,7 @@
         {
             head.removeContextPartition( next, opContext );
         }
-        catch ( NamingException ne )
+        catch ( Exception ne )
         {
             throw ne;
         }
@@ -690,7 +688,7 @@
     }
 
 
-    public void delete( DeleteOperationContext opContext ) throws NamingException
+    public void delete( DeleteOperationContext opContext ) throws Exception
     {
         Entry entry = getStartingEntry();
         Interceptor head = entry.interceptor;
@@ -700,7 +698,7 @@
         {
             head.delete( next, opContext );
         }
-        catch ( NamingException ne )
+        catch ( Exception ne )
         {
             throw ne;
         }
@@ -711,7 +709,7 @@
     }
 
 
-    public void add( AddOperationContext opContext ) throws NamingException
+    public void add( AddOperationContext opContext ) throws Exception
     {
         Entry node = getStartingEntry();
         Interceptor head = node.interceptor;
@@ -721,7 +719,7 @@
         {
             head.add( next, opContext );
         }
-        catch ( NamingException ne )
+        catch ( Exception ne )
         {
             throw ne;
         }
@@ -732,7 +730,7 @@
     }
 
 
-    public void bind( BindOperationContext opContext ) throws NamingException
+    public void bind( BindOperationContext opContext ) throws Exception
     {
         Entry node = getStartingEntry();
         Interceptor head = node.interceptor;
@@ -742,7 +740,7 @@
         {
             head.bind( next, opContext );
         }
-        catch ( NamingException ne )
+        catch ( Exception ne )
         {
             throw ne;
         }
@@ -753,7 +751,7 @@
     }
 
 
-    public void unbind( UnbindOperationContext opContext ) throws NamingException
+    public void unbind( UnbindOperationContext opContext ) throws Exception
     {
         Entry node = getStartingEntry();
         Interceptor head = node.interceptor;
@@ -763,7 +761,7 @@
         {
             head.unbind( next, opContext );
         }
-        catch ( NamingException ne )
+        catch ( Exception ne )
         {
             throw ne;
         }
@@ -774,7 +772,7 @@
     }
 
 
-    public void modify( ModifyOperationContext opContext ) throws NamingException
+    public void modify( ModifyOperationContext opContext ) throws Exception
     {
         Entry entry = getStartingEntry();
         Interceptor head = entry.interceptor;
@@ -784,7 +782,7 @@
         {
             head.modify( next, opContext );
         }
-        catch ( NamingException ne )
+        catch ( Exception ne )
         {
             throw ne;
         }
@@ -795,7 +793,7 @@
     }
 
 
-    public NamingEnumeration<ServerSearchResult> list( ListOperationContext opContext ) throws NamingException
+    public Cursor<ServerEntry> list( ListOperationContext opContext ) throws Exception
     {
         Entry entry = getStartingEntry();
         Interceptor head = entry.interceptor;
@@ -805,7 +803,7 @@
         {
             return head.list( next, opContext );
         }
-        catch ( NamingException ne )
+        catch ( Exception ne )
         {
             throw ne;
         }
@@ -817,8 +815,8 @@
     }
 
 
-    public NamingEnumeration<ServerSearchResult> search( SearchOperationContext opContext )
-        throws NamingException
+    public Cursor<ServerEntry> search( SearchOperationContext opContext )
+        throws Exception
     {
         Entry entry = getStartingEntry();
         Interceptor head = entry.interceptor;
@@ -828,7 +826,7 @@
         {
             return head.search( next, opContext );
         }
-        catch ( NamingException ne )
+        catch ( Exception ne )
         {
             throw ne;
         }
@@ -840,7 +838,7 @@
     }
 
 
-    public ServerEntry lookup( LookupOperationContext opContext ) throws NamingException
+    public ServerEntry lookup( LookupOperationContext opContext ) throws Exception
     {
         Entry entry = getStartingEntry();
         Interceptor head = entry.interceptor;
@@ -850,7 +848,7 @@
         {
             return head.lookup( next, opContext );
         }
-        catch ( NamingException ne )
+        catch ( Exception ne )
         {
             throw ne;
         }
@@ -862,7 +860,7 @@
     }
 
 
-    public boolean hasEntry( EntryOperationContext opContext ) throws NamingException
+    public boolean hasEntry( EntryOperationContext opContext ) throws Exception
     {
         Entry entry = getStartingEntry();
         Interceptor head = entry.interceptor;
@@ -872,7 +870,7 @@
         {
             return head.hasEntry( next, opContext );
         }
-        catch ( NamingException ne )
+        catch ( Exception ne )
         {
             throw ne;
         }
@@ -884,7 +882,7 @@
     }
 
 
-    public void rename( RenameOperationContext opContext ) throws NamingException
+    public void rename( RenameOperationContext opContext ) throws Exception
     {
         Entry entry = getStartingEntry();
         Interceptor head = entry.interceptor;
@@ -894,7 +892,7 @@
         {
             head.rename( next, opContext );
         }
-        catch ( NamingException ne )
+        catch ( Exception ne )
         {
             throw ne;
         }
@@ -905,7 +903,7 @@
     }
 
 
-    public void move( MoveOperationContext opContext ) throws NamingException
+    public void move( MoveOperationContext opContext ) throws Exception
     {
         Entry entry = getStartingEntry();
         Interceptor head = entry.interceptor;
@@ -915,7 +913,7 @@
         {
             head.move( next, opContext );
         }
-        catch ( NamingException ne )
+        catch ( Exception ne )
         {
             throw ne;
         }
@@ -926,7 +924,7 @@
     }
 
 
-    public void moveAndRename( MoveAndRenameOperationContext opContext ) throws NamingException
+    public void moveAndRename( MoveAndRenameOperationContext opContext ) throws Exception
     {
         Entry entry = getStartingEntry();
         Interceptor head = entry.interceptor;
@@ -936,7 +934,7 @@
         {
             head.moveAndRename( next, opContext );
         }
-        catch ( NamingException ne )
+        catch ( Exception ne )
         {
             throw ne;
         }
@@ -1020,7 +1018,7 @@
                 }
 
 
-                public boolean compare( CompareOperationContext opContext ) throws NamingException
+                public boolean compare( CompareOperationContext opContext ) throws Exception
                 {
                     Entry next = getNextEntry();
                     Interceptor interceptor = next.interceptor;
@@ -1029,7 +1027,7 @@
                     {
                         return interceptor.compare( next.nextInterceptor, opContext );
                     }
-                    catch ( NamingException ne )
+                    catch ( Exception ne )
                     {
                         throw ne;
                     }
@@ -1041,7 +1039,7 @@
                 }
 
 
-                public ServerEntry getRootDSE( GetRootDSEOperationContext opContext ) throws NamingException
+                public ServerEntry getRootDSE( GetRootDSEOperationContext opContext ) throws Exception
                 {
                     Entry next = getNextEntry();
                     Interceptor interceptor = next.interceptor;
@@ -1050,7 +1048,7 @@
                     {
                         return interceptor.getRootDSE( next.nextInterceptor, opContext );
                     }
-                    catch ( NamingException ne )
+                    catch ( Exception ne )
                     {
                         throw ne;
                     }
@@ -1062,7 +1060,7 @@
                 }
 
 
-                public LdapDN getMatchedName( GetMatchedNameOperationContext opContext ) throws NamingException
+                public LdapDN getMatchedName( GetMatchedNameOperationContext opContext ) throws Exception
                 {
                     Entry next = getNextEntry();
                     Interceptor interceptor = next.interceptor;
@@ -1071,7 +1069,7 @@
                     {
                         return interceptor.getMatchedName( next.nextInterceptor, opContext );
                     }
-                    catch ( NamingException ne )
+                    catch ( Exception ne )
                     {
                         throw ne;
                     }
@@ -1083,7 +1081,7 @@
                 }
 
 
-                public LdapDN getSuffix( GetSuffixOperationContext opContext ) throws NamingException
+                public LdapDN getSuffix( GetSuffixOperationContext opContext ) throws Exception
                 {
                     Entry next = getNextEntry();
                     Interceptor interceptor = next.interceptor;
@@ -1092,7 +1090,7 @@
                     {
                         return interceptor.getSuffix( next.nextInterceptor, opContext );
                     }
-                    catch ( NamingException ne )
+                    catch ( Exception ne )
                     {
                         throw ne;
                     }
@@ -1104,7 +1102,7 @@
                 }
 
 
-                public Iterator<String> listSuffixes( ListSuffixOperationContext opContext ) throws NamingException
+                public Iterator<String> listSuffixes( ListSuffixOperationContext opContext ) throws Exception
                 {
                     Entry next = getNextEntry();
                     Interceptor interceptor = next.interceptor;
@@ -1113,7 +1111,7 @@
                     {
                         return interceptor.listSuffixes( next.nextInterceptor, opContext );
                     }
-                    catch ( NamingException ne )
+                    catch ( Exception ne )
                     {
                         throw ne;
                     }
@@ -1125,7 +1123,7 @@
                 }
 
 
-                public void delete( DeleteOperationContext opContext ) throws NamingException
+                public void delete( DeleteOperationContext opContext ) throws Exception
                 {
                     Entry next = getNextEntry();
                     Interceptor interceptor = next.interceptor;
@@ -1134,7 +1132,7 @@
                     {
                         interceptor.delete( next.nextInterceptor, opContext );
                     }
-                    catch ( NamingException ne )
+                    catch ( Exception ne )
                     {
                         throw ne;
                     }
@@ -1145,7 +1143,7 @@
                 }
 
 
-                public void add( AddOperationContext opContext ) throws NamingException
+                public void add( AddOperationContext opContext ) throws Exception
                 {
                     Entry next = getNextEntry();
                     Interceptor interceptor = next.interceptor;
@@ -1154,7 +1152,7 @@
                     {
                         interceptor.add( next.nextInterceptor, opContext );
                     }
-                    catch ( NamingException ne )
+                    catch ( Exception ne )
                     {
                         throw ne;
                     }
@@ -1165,7 +1163,7 @@
                 }
 
 
-                public void modify( ModifyOperationContext opContext ) throws NamingException
+                public void modify( ModifyOperationContext opContext ) throws Exception
                 {
                     Entry next = getNextEntry();
                     Interceptor interceptor = next.interceptor;
@@ -1174,7 +1172,7 @@
                     {
                         interceptor.modify( next.nextInterceptor, opContext );
                     }
-                    catch ( NamingException ne )
+                    catch ( Exception ne )
                     {
                         throw ne;
                     }
@@ -1185,7 +1183,7 @@
                 }
 
                 
-                public NamingEnumeration<ServerSearchResult> list( ListOperationContext opContext ) throws NamingException
+                public Cursor<ServerEntry> list( ListOperationContext opContext ) throws Exception
                 {
                     Entry next = getNextEntry();
                     Interceptor interceptor = next.interceptor;
@@ -1194,7 +1192,7 @@
                     {
                         return interceptor.list( next.nextInterceptor, opContext );
                     }
-                    catch ( NamingException ne )
+                    catch ( Exception ne )
                     {
                         throw ne;
                     }
@@ -1206,8 +1204,8 @@
                 }
 
 
-                public NamingEnumeration<ServerSearchResult> search( SearchOperationContext opContext )
-                    throws NamingException
+                public Cursor<ServerEntry> search( SearchOperationContext opContext )
+                    throws Exception
                 {
                     Entry next = getNextEntry();
                     Interceptor interceptor = next.interceptor;
@@ -1216,7 +1214,7 @@
                     {
                         return interceptor.search( next.nextInterceptor, opContext );
                     }
-                    catch ( NamingException ne )
+                    catch ( Exception ne )
                     {
                         throw ne;
                     }
@@ -1228,7 +1226,7 @@
                 }
 
 
-                public ServerEntry lookup( LookupOperationContext opContext ) throws NamingException
+                public ServerEntry lookup( LookupOperationContext opContext ) throws Exception
                 {
                     Entry next = getNextEntry();
                     Interceptor interceptor = next.interceptor;
@@ -1237,7 +1235,7 @@
                     {
                         return interceptor.lookup( next.nextInterceptor, opContext );
                     }
-                    catch ( NamingException ne )
+                    catch ( Exception ne )
                     {
                         throw ne;
                     }
@@ -1249,7 +1247,7 @@
                 }
 
 
-                public boolean hasEntry( EntryOperationContext opContext ) throws NamingException
+                public boolean hasEntry( EntryOperationContext opContext ) throws Exception
                 {
                     Entry next = getNextEntry();
                     Interceptor interceptor = next.interceptor;
@@ -1258,7 +1256,7 @@
                     {
                         return interceptor.hasEntry( next.nextInterceptor, opContext );
                     }
-                    catch ( NamingException ne )
+                    catch ( Exception ne )
                     {
                         throw ne;
                     }
@@ -1270,7 +1268,7 @@
                 }
 
 
-                public void rename( RenameOperationContext opContext ) throws NamingException
+                public void rename( RenameOperationContext opContext ) throws Exception
                 {
                     Entry next = getNextEntry();
                     Interceptor interceptor = next.interceptor;
@@ -1279,7 +1277,7 @@
                     {
                         interceptor.rename( next.nextInterceptor, opContext );
                     }
-                    catch ( NamingException ne )
+                    catch ( Exception ne )
                     {
                         throw ne;
                     }
@@ -1290,7 +1288,7 @@
                 }
 
 
-                public void move( MoveOperationContext opContext ) throws NamingException
+                public void move( MoveOperationContext opContext ) throws Exception
                 {
                     Entry next = getNextEntry();
                     Interceptor interceptor = next.interceptor;
@@ -1299,7 +1297,7 @@
                     {
                         interceptor.move( next.nextInterceptor, opContext );
                     }
-                    catch ( NamingException ne )
+                    catch ( Exception ne )
                     {
                         throw ne;
                     }
@@ -1311,7 +1309,7 @@
 
 
                 public void moveAndRename( MoveAndRenameOperationContext opContext )
-                    throws NamingException
+                    throws Exception
                 {
                     Entry next = getNextEntry();
                     Interceptor interceptor = next.interceptor;
@@ -1320,7 +1318,7 @@
                     {
                         interceptor.moveAndRename( next.nextInterceptor, opContext );
                     }
-                    catch ( NamingException ne )
+                    catch ( Exception ne )
                     {
                         throw ne;
                     }
@@ -1331,7 +1329,7 @@
                 }
 
 
-                public void bind( BindOperationContext opContext ) throws NamingException
+                public void bind( BindOperationContext opContext ) throws Exception
                 {
                     Entry next = getNextEntry();
                     Interceptor interceptor = next.interceptor;
@@ -1340,7 +1338,7 @@
                     {
                         interceptor.bind( next.nextInterceptor, opContext );
                     }
-                    catch ( NamingException ne )
+                    catch ( Exception ne )
                     {
                         throw ne;
                     }
@@ -1351,7 +1349,7 @@
                 }
 
 
-                public void unbind( UnbindOperationContext opContext ) throws NamingException
+                public void unbind( UnbindOperationContext opContext ) throws Exception
                 {
                     Entry next = getNextEntry();
                     Interceptor interceptor = next.interceptor;
@@ -1360,7 +1358,7 @@
                     {
                         interceptor.unbind( next.nextInterceptor, opContext );
                     }
-                    catch ( NamingException ne )
+                    catch ( Exception ne )
                     {
                         throw ne;
                     }
@@ -1371,7 +1369,7 @@
                 }
 
 
-                public void addContextPartition( AddContextPartitionOperationContext opContext ) throws NamingException
+                public void addContextPartition( AddContextPartitionOperationContext opContext ) throws Exception
                 {
                     Entry next = getNextEntry();
                     Interceptor interceptor = next.interceptor;
@@ -1380,7 +1378,7 @@
                     {
                         interceptor.addContextPartition( next.nextInterceptor, opContext );
                     }
-                    catch ( NamingException ne )
+                    catch ( Exception ne )
                     {
                         throw ne;
                     }
@@ -1392,7 +1390,7 @@
                 }
 
 
-                public void removeContextPartition( RemoveContextPartitionOperationContext opContext ) throws NamingException
+                public void removeContextPartition( RemoveContextPartitionOperationContext opContext ) throws Exception
                 {
                     Entry next = getNextEntry();
                     Interceptor interceptor = next.interceptor;
@@ -1401,7 +1399,7 @@
                     {
                         interceptor.removeContextPartition( next.nextInterceptor, opContext );
                     }
-                    catch ( NamingException ne )
+                    catch ( Exception ne )
                     {
                         throw ne;
                     }

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java?rev=658821&r1=658820&r2=658821&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java Wed May 21 12:26:49 2008
@@ -22,11 +22,8 @@
 
 import java.util.Iterator;
 
-import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
-
+import org.apache.directory.server.core.cursor.Cursor;
 import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.entry.ServerSearchResult;
 import org.apache.directory.server.core.interceptor.context.AddContextPartitionOperationContext;
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.interceptor.context.BindOperationContext;
@@ -63,112 +60,111 @@
     /**
      * Calls the next interceptor's {@link Interceptor#compare( NextInterceptor, CompareOperationContext )}.
      */
-    boolean compare( CompareOperationContext opContext ) throws NamingException;
+    boolean compare( CompareOperationContext opContext ) throws Exception;
 
 
     /**
      * Calls the next interceptor's {@link Interceptor#getRootDSE( NextInterceptor, GetRootDSEOperationContext )}.
      */
-    ServerEntry getRootDSE( GetRootDSEOperationContext opContext ) throws NamingException;
+    ServerEntry getRootDSE( GetRootDSEOperationContext opContext ) throws Exception;
 
 
     /**
      * Calls the next interceptor's {@link Interceptor#getMatchedName( NextInterceptor, GetMatchedNameOperationContext )}.
      */
-    LdapDN getMatchedName( GetMatchedNameOperationContext opContext ) throws NamingException;
+    LdapDN getMatchedName( GetMatchedNameOperationContext opContext ) throws Exception;
 
 
     /**
      * Calls the next interceptor's {@link Interceptor#getSuffix( NextInterceptor, GetSuffixOperationContext )}.
      */
-    LdapDN getSuffix( GetSuffixOperationContext opContext ) throws NamingException;
+    LdapDN getSuffix( GetSuffixOperationContext opContext ) throws Exception;
 
 
     /**
      * Calls the next interceptor's {@link Interceptor#listSuffixes( NextInterceptor, ListSuffixOperationContext )}.
      */
-    Iterator<String> listSuffixes( ListSuffixOperationContext opContext ) throws NamingException;
+    Iterator<String> listSuffixes( ListSuffixOperationContext opContext ) throws Exception;
 
 
     /**
      * Calls the next interceptor's {@link PartitionNexus#addContextPartition( AddContextPartitionOperationContext )}.
      */
-    void addContextPartition( AddContextPartitionOperationContext opContext ) throws NamingException;
+    void addContextPartition( AddContextPartitionOperationContext opContext ) throws Exception;
 
 
     /**
      * Calls the next interceptor's {@link PartitionNexus#removeContextPartition( RemoveContextPartitionOperationContext )}.
      */
-    void removeContextPartition( RemoveContextPartitionOperationContext opContext ) throws NamingException;
+    void removeContextPartition( RemoveContextPartitionOperationContext opContext ) throws Exception;
 
 
     /**
      * Calls the next interceptor's {@link Interceptor#delete(NextInterceptor, DeleteOperationContext )}.
      */
-    void delete( DeleteOperationContext opContext ) throws NamingException;
+    void delete( DeleteOperationContext opContext ) throws Exception;
 
 
     /**
      * Calls the next interceptor's {@link Interceptor#add( NextInterceptor, AddOperationContext )}.
      */
-    void add( AddOperationContext opContext ) throws NamingException;
+    void add( AddOperationContext opContext ) throws Exception;
 
 
     /**
      * Calls the next interceptor's {@link Interceptor#modify( NextInterceptor, ModifyOperationContext )}.
      */
-    void modify( ModifyOperationContext opContext ) throws NamingException;
+    void modify( ModifyOperationContext opContext ) throws Exception;
 
     /**
      * Calls the next interceptor's {@link Interceptor#list( NextInterceptor, ListOperationContext )}.
      */
-    NamingEnumeration<ServerSearchResult> list( ListOperationContext opContext ) throws NamingException;
+    Cursor<ServerEntry> list( ListOperationContext opContext ) throws Exception;
 
 
     /**
      * Calls the next interceptor's {@link Interceptor#search( NextInterceptor, SearchOperationContext opContext )}.
      */
-    NamingEnumeration<ServerSearchResult> search( SearchOperationContext opContext )
-        throws NamingException;
+    Cursor<ServerEntry> search( SearchOperationContext opContext ) throws Exception;
 
 
     /**
      * Calls the next interceptor's {@link Interceptor#lookup( NextInterceptor, LookupOperationContext )}.
      */
-    ServerEntry lookup( LookupOperationContext opContext ) throws NamingException;
+    ServerEntry lookup( LookupOperationContext opContext ) throws Exception;
 
 
     /**
      * Calls the next interceptor's {@link Interceptor#hasEntry( NextInterceptor, EntryOperationContext )}.
      */
-    boolean hasEntry( EntryOperationContext opContext ) throws NamingException;
+    boolean hasEntry( EntryOperationContext opContext ) throws Exception;
 
 
     /**
      * Calls the next interceptor's {@link Interceptor#rename( NextInterceptor, RenameOperationContext )}.
      */
-    void rename( RenameOperationContext opContext ) throws NamingException;
+    void rename( RenameOperationContext opContext ) throws Exception;
 
 
     /**
      * Calls the next interceptor's {@link Interceptor#move( NextInterceptor, MoveOperationContext )}.
      */
-    void move( MoveOperationContext opContext ) throws NamingException;
+    void move( MoveOperationContext opContext ) throws Exception;
 
 
     /**
      * Calls the next interceptor's {@link Interceptor#moveAndRename( NextInterceptor, MoveAndRenameOperationContext )}.
      */
-    void moveAndRename( MoveAndRenameOperationContext opContext ) throws NamingException;
+    void moveAndRename( MoveAndRenameOperationContext opContext ) throws Exception;
 
 
     /**
      * Calls the next interceptor's {@link Interceptor#bind( NextInterceptor, BindOperationContext )}
      */
-    void bind( BindOperationContext opContext ) throws NamingException;
+    void bind( BindOperationContext opContext ) throws Exception;
 
     /**
      * Calls the next interceptor's {@link Interceptor#unbind( NextInterceptor, UnbindOperationContext )}
      */
-    void unbind( UnbindOperationContext opContext ) throws NamingException;
+    void unbind( UnbindOperationContext opContext ) throws Exception;
 }