directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r555477 [1/2] - in /directory/apacheds/trunk: bootstrap-extract/src/main/java/org/apache/directory/server/schema/bootstrap/partition/ core/src/main/java/org/apache/directory/server/core/ core/src/main/java/org/apache/directory/server/core/a...
Date Thu, 12 Jul 2007 03:13:52 GMT
Author: akarasulu
Date: Wed Jul 11 20:13:50 2007
New Revision: 555477

URL: http://svn.apache.org/viewvc?view=rev&rev=555477
Log:
Modified Interceptor configuration to hold only data.

Added:
    directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/interceptor/MockInterceptor.java   (with props)
    directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/configuration/MutableReplicationInterceptorConfiguration.java   (with props)
    directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/configuration/ReplicationInterceptorConfiguration.java   (with props)
Modified:
    directory/apacheds/trunk/bootstrap-extract/src/main/java/org/apache/directory/server/schema/bootstrap/partition/DbFileListing.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/InterceptorConfiguration.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/MutableInterceptorConfiguration.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/EventService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaManager.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java
    directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java
    directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java
    directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/ReplicationServiceITest.java
    directory/apacheds/trunk/server-installers/src/main/installers/server.xml
    directory/apacheds/trunk/server-main/server.xml
    directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/KeyDerivationServiceITest.java
    directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/PasswordPolicyServiceITest.java
    directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/SaslGssapiBindITest.java

Modified: directory/apacheds/trunk/bootstrap-extract/src/main/java/org/apache/directory/server/schema/bootstrap/partition/DbFileListing.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/bootstrap-extract/src/main/java/org/apache/directory/server/schema/bootstrap/partition/DbFileListing.java?view=diff&rev=555477&r1=555476&r2=555477
==============================================================================
--- directory/apacheds/trunk/bootstrap-extract/src/main/java/org/apache/directory/server/schema/bootstrap/partition/DbFileListing.java (original)
+++ directory/apacheds/trunk/bootstrap-extract/src/main/java/org/apache/directory/server/schema/bootstrap/partition/DbFileListing.java Wed Jul 11 20:13:50 2007
@@ -52,6 +52,28 @@
     }
 
 
+    /**
+     * Reads the DBFILES resource within some jar on the classpath that 
+     * has this file and loaded it's db files into the name2type map with
+     * something like the following entries ( key => value ):
+     * <pre>
+     * schema/master.db => MASTER_FILE
+     * schema/apacheOnealias.db => SYSTEM_INDEX
+     * schema/apacheSubalias.db => SYSTEM_INDEX
+     * schema/apacheNdn.db => SYSTEM_INDEX
+     * schema/apacheExistance.db => SYSTEM_INDEX
+     * schema/apacheAlias.db => SYSTEM_INDEX
+     * schema/apacheHierarchy.db => SYSTEM_INDEX
+     * schema/apacheUpdn.db => SYSTEM_INDEX
+     * schema/objectClass.db => USER_INDEX
+     * schema/ou.db => USER_INDEX
+     * schema/cn.db => USER_INDEX
+     * schema/m-oid.db => USER_INDEX
+     * schema/m-disabled.db => USER_INDEX
+     * </pre>
+     *
+     * @throws IOException
+     */
     private void init() throws IOException
     {
 
@@ -77,7 +99,8 @@
                 if ( userIndexMode )
                 {
                     name2type.put( line.trim(), DbFileType.USER_INDEX );
-                } else
+                } 
+                else
                 {
                     name2type.put( line.trim(), DbFileType.SYSTEM_INDEX );
                 }
@@ -89,6 +112,16 @@
         }
     }
 
+    
+    /**
+     * Gets the DBFILE resource from within a jar off the base path.  If another jar
+     * with such a DBFILE resource exists then an error will result since the resource
+     * is not unique across all the jars.
+     *
+     * @param resourceName the file name of the resource to load
+     * @return the InputStream to read the contents of the resource
+     * @throws IOException if there are problems reading or finding a unique copy of the resource
+     */
     public static InputStream getUniqueResourceAsStream( String resourceName ) throws IOException
     {
         resourceName = BASE_PATH + resourceName;

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?view=diff&rev=555477&r1=555476&r2=555477
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java Wed Jul 11 20:13:50 2007
@@ -565,7 +565,7 @@
 
             partitionNexus.add( new AddOperationContext( name, attributes ) );
             
-            Interceptor authzInterceptor = interceptorChain.get( AuthorizationService.NAME );
+            Interceptor authzInterceptor = interceptorChain.get( StartupConfiguration.AUTHORIZATION_SERVICE_NAME );
             
             if ( authzInterceptor == null )
             {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java?view=diff&rev=555477&r1=555476&r2=555477
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java Wed Jul 11 20:13:50 2007
@@ -70,9 +70,6 @@
 {
     private static final Logger log = LoggerFactory.getLogger( AuthenticationService.class );
     
-    /** The service name */
-    public static final String NAME = "authenticationService";
-    
     /** Speedup for logs */
     private static final boolean IS_DEBUG = log.isDebugEnabled();
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java?view=diff&rev=555477&r1=555476&r2=555477
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java Wed Jul 11 20:13:50 2007
@@ -36,22 +36,12 @@
 import javax.naming.directory.Attributes;
 
 import org.apache.commons.collections.map.LRUMap;
-import org.apache.directory.server.core.authz.AuthorizationService;
-import org.apache.directory.server.core.authz.DefaultAuthorizationService;
-import org.apache.directory.server.core.collective.CollectiveAttributeService;
-import org.apache.directory.server.core.event.EventService;
-import org.apache.directory.server.core.exception.ExceptionService;
+import org.apache.directory.server.core.configuration.StartupConfiguration;
 import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
 import org.apache.directory.server.core.invocation.Invocation;
 import org.apache.directory.server.core.invocation.InvocationStack;
 import org.apache.directory.server.core.jndi.ServerContext;
-import org.apache.directory.server.core.normalization.NormalizationService;
-import org.apache.directory.server.core.operational.OperationalAttributeService;
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
-import org.apache.directory.server.core.referral.ReferralService;
-import org.apache.directory.server.core.schema.SchemaService;
-import org.apache.directory.server.core.subtree.SubentryService;
-import org.apache.directory.server.core.trigger.TriggerService;
 import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
 import org.apache.directory.shared.ldap.constants.LdapSecurityConstants;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
@@ -112,18 +102,18 @@
     static
     {
         Set<String> c = new HashSet<String>();
-        c.add( NormalizationService.NAME );
-        c.add( AuthenticationService.NAME );
-        c.add( ReferralService.NAME );
-        c.add( AuthorizationService.NAME );
-        c.add( DefaultAuthorizationService.NAME );
-        c.add( ExceptionService.NAME );
-        c.add( OperationalAttributeService.NAME );
-        c.add( SchemaService.NAME );
-        c.add( SubentryService.NAME );
-        c.add( CollectiveAttributeService.NAME );
-        c.add( EventService.NAME );
-        c.add( TriggerService.NAME );
+        c.add( StartupConfiguration.NORMALIZATION_SERVICE_NAME );
+        c.add( StartupConfiguration.AUTHENTICATION_SERVICE_NAME );
+        c.add( StartupConfiguration.REFERRAL_SERVICE_NAME );
+        c.add( StartupConfiguration.AUTHORIZATION_SERVICE_NAME );
+        c.add( StartupConfiguration.DEFAULT_AUTHORIZATION_SERVICE_NAME );
+        c.add( StartupConfiguration.EXCEPTION_SERVICE_NAME );
+        c.add( StartupConfiguration.OPERATIONAL_ATTRIBUTE_SERVICE_NAME );
+        c.add( StartupConfiguration.SCHEMA_SERVICE_NAME );
+        c.add( StartupConfiguration.SUBENTRY_SERVICE_NAME );
+        c.add( StartupConfiguration.COLLECTIVE_ATTRIBUTE_SERVICE_NAME );
+        c.add( StartupConfiguration.EVENT_SERVICE_NAME );
+        c.add( StartupConfiguration.TRIGGER_SERVICE_NAME );
         USERLOOKUP_BYPASS = Collections.unmodifiableCollection( c );
     }
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java?view=diff&rev=555477&r1=555476&r2=555477
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java Wed Jul 11 20:13:50 2007
@@ -20,7 +20,6 @@
 package org.apache.directory.server.core.authz;
 
 
-
 import java.text.ParseException;
 import java.util.Collection;
 import java.util.Collections;
@@ -39,6 +38,7 @@
 import org.apache.directory.server.core.authn.LdapPrincipal;
 import org.apache.directory.server.core.authz.support.ACDFEngine;
 import org.apache.directory.server.core.configuration.InterceptorConfiguration;
+import org.apache.directory.server.core.configuration.StartupConfiguration;
 import org.apache.directory.server.core.enumeration.SearchResultFilter;
 import org.apache.directory.server.core.enumeration.SearchResultFilteringEnumeration;
 import org.apache.directory.server.core.interceptor.BaseInterceptor;
@@ -87,9 +87,6 @@
 {
     /** the logger for this class */
     private static final Logger log = LoggerFactory.getLogger( AuthorizationService.class );
-    
-    /** The service name */
-    public static final String NAME = "authorizationService";
 
     /**
      * the multivalued op attr used to track the perscriptive access control
@@ -422,7 +419,7 @@
         }
 
         // perform checks below here for all non-admin users
-        SubentryService subentryService = ( SubentryService ) chain.get( SubentryService.NAME );
+        SubentryService subentryService = ( SubentryService ) chain.get( StartupConfiguration.SUBENTRY_SERVICE_NAME );
         Attributes subentryAttrs = subentryService.getSubentryAttributes( name, entry );
         NamingEnumeration attrList = entry.getAll();
         
@@ -821,7 +818,7 @@
         // we need to construct an entry to represent it
         // at least with minimal requirements which are object class
         // and access control subentry operational attributes.
-        SubentryService subentryService = ( SubentryService ) chain.get( SubentryService.NAME );
+        SubentryService subentryService = ( SubentryService ) chain.get( StartupConfiguration.SUBENTRY_SERVICE_NAME );
         Attributes subentryAttrs = subentryService.getSubentryAttributes( newName, importedEntry );
         NamingEnumeration attrList = importedEntry.getAll();
         
@@ -896,7 +893,7 @@
         // we need to construct an entry to represent it
         // at least with minimal requirements which are object class
         // and access control subentry operational attributes.
-        SubentryService subentryService = ( SubentryService ) chain.get( SubentryService.NAME );
+        SubentryService subentryService = ( SubentryService ) chain.get( StartupConfiguration.SUBENTRY_SERVICE_NAME );
         Attributes subentryAttrs = subentryService.getSubentryAttributes( newName, importedEntry );
         NamingEnumeration attrList = importedEntry.getAll();
         

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationService.java?view=diff&rev=555477&r1=555476&r2=555477
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationService.java Wed Jul 11 20:13:50 2007
@@ -74,9 +74,6 @@
 {
     /** the logger for this class */
     private static final Logger log = LoggerFactory.getLogger( DefaultAuthorizationService.class );
-    
-    /** The service name */
-    public static final String NAME = "defaultAuthorizationService";
 
     /**
      * the base distinguished {@link Name} for all users

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java?view=diff&rev=555477&r1=555476&r2=555477
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java Wed Jul 11 20:13:50 2007
@@ -29,20 +29,13 @@
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
 
-import org.apache.directory.server.core.authn.AuthenticationService;
-import org.apache.directory.server.core.authz.AuthorizationService;
-import org.apache.directory.server.core.authz.DefaultAuthorizationService;
+import org.apache.directory.server.core.configuration.StartupConfiguration;
 import org.apache.directory.server.core.event.Evaluator;
-import org.apache.directory.server.core.event.EventService;
 import org.apache.directory.server.core.event.ExpressionEvaluator;
 import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
-import org.apache.directory.server.core.normalization.NormalizationService;
-import org.apache.directory.server.core.operational.OperationalAttributeService;
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
-import org.apache.directory.server.core.schema.SchemaService;
 import org.apache.directory.server.core.subtree.RefinementEvaluator;
 import org.apache.directory.server.core.subtree.RefinementLeafEvaluator;
-import org.apache.directory.server.core.subtree.SubentryService;
 import org.apache.directory.server.core.subtree.SubtreeEvaluator;
 import org.apache.directory.server.core.trigger.TriggerService;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
@@ -127,7 +120,7 @@
      */
     public void checkPermission( PartitionNexusProxy proxy, Collection userGroupNames, LdapDN username,
                                  AuthenticationLevel authenticationLevel, LdapDN entryName, String attrId, Object attrValue,
-                                 Collection microOperations, Collection aciTuples, Attributes entry ) throws NamingException
+                                 Collection microOperations, Collection<ACITuple> aciTuples, Attributes entry ) throws NamingException
     {
         if ( !hasPermission( proxy, userGroupNames, username, authenticationLevel, entryName, attrId, attrValue,
             microOperations, aciTuples, entry ) )
@@ -140,15 +133,15 @@
     static
     {
         Collection<String> c = new HashSet<String>();
-        c.add( NormalizationService.NAME );
-        c.add( AuthenticationService.NAME );
-        c.add( AuthorizationService.NAME );
-        c.add( DefaultAuthorizationService.NAME );
-        c.add( SchemaService.NAME );
-        c.add( SubentryService.NAME );
-        c.add( OperationalAttributeService.NAME );
-        c.add( EventService.NAME );
-        c.add( TriggerService.NAME );
+        c.add( StartupConfiguration.NORMALIZATION_SERVICE_NAME );
+        c.add( StartupConfiguration.AUTHENTICATION_SERVICE_NAME );
+        c.add( StartupConfiguration.AUTHORIZATION_SERVICE_NAME );
+        c.add( StartupConfiguration.DEFAULT_AUTHORIZATION_SERVICE_NAME );
+        c.add( StartupConfiguration.SCHEMA_SERVICE_NAME );
+        c.add( StartupConfiguration.SUBENTRY_SERVICE_NAME );
+        c.add( StartupConfiguration.OPERATIONAL_ATTRIBUTE_SERVICE_NAME );
+        c.add( StartupConfiguration.EVENT_SERVICE_NAME );
+        c.add( StartupConfiguration.TRIGGER_SERVICE_NAME );
         USER_LOOKUP_BYPASS = Collections.unmodifiableCollection( c );
     }
 
@@ -171,7 +164,7 @@
      */
     public boolean hasPermission( PartitionNexusProxy proxy, Collection userGroupNames, LdapDN userName,
                                   AuthenticationLevel authenticationLevel, LdapDN entryName, String attrId, Object attrValue,
-                                  Collection microOperations, Collection aciTuples, Attributes entry ) throws NamingException
+                                  Collection microOperations, Collection<ACITuple> aciTuples, Attributes entry ) throws NamingException
     {
         if ( entryName == null )
         {
@@ -196,7 +189,7 @@
         }
 
         // Clone aciTuples in case it is unmodifiable.
-        aciTuples = new ArrayList( aciTuples );
+        aciTuples = new ArrayList<ACITuple>( aciTuples );
 
         // Filter unrelated and invalid tuples
         for ( int i = 0; i < filters.length; i++ )

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java?view=diff&rev=555477&r1=555476&r2=555477
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java Wed Jul 11 20:13:50 2007
@@ -32,16 +32,9 @@
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 
-import org.apache.directory.server.core.authn.AuthenticationService;
-import org.apache.directory.server.core.authz.AuthorizationService;
-import org.apache.directory.server.core.authz.DefaultAuthorizationService;
-import org.apache.directory.server.core.event.EventService;
+import org.apache.directory.server.core.configuration.StartupConfiguration;
 import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
-import org.apache.directory.server.core.normalization.NormalizationService;
-import org.apache.directory.server.core.operational.OperationalAttributeService;
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
-import org.apache.directory.server.core.schema.SchemaService;
-import org.apache.directory.server.core.subtree.SubentryService;
 import org.apache.directory.shared.ldap.aci.ACITuple;
 import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
 import org.apache.directory.shared.ldap.aci.ProtectedItem;
@@ -129,14 +122,14 @@
     static
     {
         Collection<String> c = new HashSet<String>();
-        c.add( NormalizationService.NAME );
-        c.add( AuthenticationService.NAME );
-        c.add( AuthorizationService.NAME );
-        c.add( DefaultAuthorizationService.NAME );
-        c.add( SchemaService.NAME );
-        c.add( SubentryService.NAME );
-        c.add( OperationalAttributeService.NAME );
-        c.add( EventService.NAME );
+        c.add( StartupConfiguration.NORMALIZATION_SERVICE_NAME );
+        c.add( StartupConfiguration.AUTHENTICATION_SERVICE_NAME );
+        c.add( StartupConfiguration.AUTHORIZATION_SERVICE_NAME );
+        c.add( StartupConfiguration.DEFAULT_AUTHORIZATION_SERVICE_NAME );
+        c.add( StartupConfiguration.SCHEMA_SERVICE_NAME );
+        c.add( StartupConfiguration.SUBENTRY_SERVICE_NAME );
+        c.add( StartupConfiguration.OPERATIONAL_ATTRIBUTE_SERVICE_NAME );
+        c.add( StartupConfiguration.EVENT_SERVICE_NAME );
         SEARCH_BYPASS = Collections.unmodifiableCollection( c );
     }
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java?view=diff&rev=555477&r1=555476&r2=555477
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java Wed Jul 11 20:13:50 2007
@@ -66,9 +66,6 @@
  */
 public class CollectiveAttributeService extends BaseInterceptor
 {
-    /** The service name */
-    public static final String NAME = "collectiveAttributeService";
-
     public static final String EXCLUDE_ALL_COLLECTIVE_ATTRIBUTES_OID = "2.5.18.0";
     public static final String EXCLUDE_ALL_COLLECTIVE_ATTRIBUTES = "excludeAllCollectiveAttributes";
     

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/InterceptorConfiguration.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/InterceptorConfiguration.java?view=diff&rev=555477&r1=555476&r2=555477
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/InterceptorConfiguration.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/InterceptorConfiguration.java Wed Jul 11 20:13:50 2007
@@ -20,11 +20,8 @@
 package org.apache.directory.server.core.configuration;
 
 
-import org.apache.directory.server.core.interceptor.Interceptor;
-
-
 /**
- * A configuration for {@link Interceptor}.
+ * Holds general configuration information for interceptors.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
@@ -32,7 +29,7 @@
 public class InterceptorConfiguration
 {
     private String name;
-    private Interceptor interceptor;
+    private String interceptorClassName;
 
 
     /**
@@ -44,22 +41,22 @@
 
 
     /**
-     * Returns the {@link Interceptor} that this configuration
-     * configures.
+     * Returns the fully qualified class name of the interceptor 
+     * implementation associated with this configuration.
      */
-    public Interceptor getInterceptor()
+    public String getInterceptorClassName()
     {
-        return interceptor;
+        return interceptorClassName;
     }
 
 
     /**
-     * Sets the {@link Interceptor} that this configuration
-     * configures.
+     * Sets the fully qualified class name of the interceptor associated
+     * with this configuration.
      */
-    protected void setInterceptor( Interceptor authenticator )
+    protected void setInterceptorClassName( String interceptorClass )
     {
-        this.interceptor = authenticator;
+        this.interceptorClassName = interceptorClass;
     }
 
 
@@ -93,9 +90,9 @@
             throw new ConfigurationException( "Name is not specified." );
         }
 
-        if ( interceptor == null )
+        if ( interceptorClassName == null )
         {
-            throw new ConfigurationException( "Interceptor is not specified." );
+            throw new ConfigurationException( "Interceptor class name is not specified." );
         }
     }
     

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/MutableInterceptorConfiguration.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/MutableInterceptorConfiguration.java?view=diff&rev=555477&r1=555476&r2=555477
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/MutableInterceptorConfiguration.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/MutableInterceptorConfiguration.java Wed Jul 11 20:13:50 2007
@@ -20,9 +20,6 @@
 package org.apache.directory.server.core.configuration;
 
 
-import org.apache.directory.server.core.interceptor.Interceptor;
-
-
 /**
  * A mutable version of {@link InterceptorConfiguration}.
  *
@@ -40,9 +37,9 @@
     }
 
 
-    public void setInterceptor( Interceptor interceptor )
+    public void setInterceptorClassName( String interceptorClassName )
     {
-        super.setInterceptor( interceptor );
+        super.setInterceptorClassName( interceptorClassName );
     }
 
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java?view=diff&rev=555477&r1=555476&r2=555477
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java Wed Jul 11 20:13:50 2007
@@ -31,20 +31,8 @@
 
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.authn.AnonymousAuthenticator;
-import org.apache.directory.server.core.authn.AuthenticationService;
 import org.apache.directory.server.core.authn.SimpleAuthenticator;
 import org.apache.directory.server.core.authn.StrongAuthenticator;
-import org.apache.directory.server.core.authz.AuthorizationService;
-import org.apache.directory.server.core.authz.DefaultAuthorizationService;
-import org.apache.directory.server.core.collective.CollectiveAttributeService;
-import org.apache.directory.server.core.event.EventService;
-import org.apache.directory.server.core.exception.ExceptionService;
-import org.apache.directory.server.core.normalization.NormalizationService;
-import org.apache.directory.server.core.operational.OperationalAttributeService;
-import org.apache.directory.server.core.referral.ReferralService;
-import org.apache.directory.server.core.schema.SchemaService;
-import org.apache.directory.server.core.subtree.SubentryService;
-import org.apache.directory.server.core.trigger.TriggerService;
 import org.apache.directory.shared.ldap.ldif.Entry;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -58,11 +46,57 @@
  */
 public class StartupConfiguration extends Configuration
 {
+    /** The normalizationService name */
+    public static final String NORMALIZATION_SERVICE_NAME = "normalizationService";
+    /** The fully qualified class name for the normalization service */
+    private static final String NORMALIZATION_SERVICE_CLASS = "org.apache.directory.server.core.normalization.NormalizationService";
+    /** The authenticationService name */
+    public static final String AUTHENTICATION_SERVICE_NAME = "authenticationService";
+    /** The fully qualified class name for the normalization service */
+    private static final String AUTHENTICATION_SERVICE_CLASS = "org.apache.directory.server.core.authn.AuthenticationService";
+    /** The referralService name */
+    public static final String REFERRAL_SERVICE_NAME = "referralService";
+    /** The fully qualified class name for the referral service */
+    private static final String REFERRAL_SERVICE_CLASS = "org.apache.directory.server.core.referral.ReferralService";
+    /** The authorizationService name */
+    public static final String AUTHORIZATION_SERVICE_NAME = "authorizationService";
+    /** The fully qualified class name for the authorization service */
+    private static final String AUTHORIZATION_SERVICE_CLASS = "org.apache.directory.server.core.authz.AuthorizationService";
+    /** The default authorization service name */
+    public static final String DEFAULT_AUTHORIZATION_SERVICE_NAME = "defaultAuthorizationService";
+    /** The fully qualified class name for the default authorization service */
+    private static final String DEFAULT_AUTHORIZATION_SERVICE_CLASS = "org.apache.directory.server.core.authz.DefaultAuthorizationService";
+    /** The exceptionService name */
+    public static final String EXCEPTION_SERVICE_NAME = "exceptionService";
+    /** The fully qualified class name for the default authorization service */
+    private static final String EXCEPTION_SERVICE_CLASS = "org.apache.directory.server.core.exception.ExceptionService";
+    /** The operationalAttributeService name */
+    public static final String OPERATIONAL_ATTRIBUTE_SERVICE_NAME = "operationalAttributeService";
+    /** The fully qualified class name for the default operational attribute service */
+    private static final String OPERATIONAL_ATTRIBUTE_SERVICE_CLASS = "org.apache.directory.server.core.operational.OperationalAttributeService";
+    /** The schemaService name */
+    public static final String SCHEMA_SERVICE_NAME = "schemaService";
+    /** The fully qualified class name for the schema service */
+    private static final String SCHEMA_SERVICE_CLASS = "org.apache.directory.server.core.schema.SchemaService";
+    /** The subentryService name */
+    public static final String SUBENTRY_SERVICE_NAME = "subentryService";
+    /** The fully qualified class name for the subentry service */
+    private static final String SUBENTRY_SERVICE_CLASS = "org.apache.directory.server.core.subtree.SubentryService";
+    /** The collectiveAttributeService name */
+    public static final String COLLECTIVE_ATTRIBUTE_SERVICE_NAME = "collectiveAttributeService";
+    /** The fully qualified class name for the collective attribute service */
+    private static final String COLLECTIVE_ATTRIBUTE_SERVICE_CLASS = "org.apache.directory.server.core.collective.CollectiveAttributeService";
+    /** The eventService name */
+    public static final String EVENT_SERVICE_NAME = "eventService";
+    /** The fully qualified class name for the event service */
+    private static final String EVENT_SERVICE_CLASS = "org.apache.directory.server.core.event.EventService";
+    /** The triggerService name */
+    public static final String TRIGGER_SERVICE_NAME = "triggerService";
+    /** The fully qualified class name for the trigger service */
+    private static final String TRIGGER_SERVICE_CLASS = "org.apache.directory.server.core.trigger.TriggerService";
+    /** The logger for this class */
     private static final Logger log = LoggerFactory.getLogger( StartupConfiguration.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = log.isDebugEnabled();
-
     private static final long serialVersionUID = 4826762196566871677L;
 
     public static final int MAX_THREADS_DEFAULT = 4;
@@ -123,7 +157,7 @@
         setAuthenticatorConfigurations( set );
     }
 
-
+    
     private void setDefaultInterceptorConfigurations()
     {
         // Set default interceptor chains
@@ -131,63 +165,63 @@
         List<InterceptorConfiguration> list = new ArrayList<InterceptorConfiguration>();
 
         interceptorCfg = new MutableInterceptorConfiguration();
-        interceptorCfg.setName( NormalizationService.NAME );
-        interceptorCfg.setInterceptor( new NormalizationService() );
+        interceptorCfg.setName( NORMALIZATION_SERVICE_NAME );
+        interceptorCfg.setInterceptorClassName( NORMALIZATION_SERVICE_CLASS );
         list.add( interceptorCfg );
 
         interceptorCfg = new MutableInterceptorConfiguration();
-        interceptorCfg.setName( AuthenticationService.NAME );
-        interceptorCfg.setInterceptor( new AuthenticationService() );
+        interceptorCfg.setName( AUTHENTICATION_SERVICE_NAME );
+        interceptorCfg.setInterceptorClassName( AUTHENTICATION_SERVICE_CLASS );
         list.add( interceptorCfg );
 
         interceptorCfg = new MutableInterceptorConfiguration();
-        interceptorCfg.setName( ReferralService.NAME );
-        interceptorCfg.setInterceptor( new ReferralService() );
+        interceptorCfg.setName( REFERRAL_SERVICE_NAME );
+        interceptorCfg.setInterceptorClassName( REFERRAL_SERVICE_CLASS );
         list.add( interceptorCfg );
 
         interceptorCfg = new MutableInterceptorConfiguration();
-        interceptorCfg.setName( AuthorizationService.NAME );
-        interceptorCfg.setInterceptor( new AuthorizationService() );
+        interceptorCfg.setName( AUTHORIZATION_SERVICE_NAME );
+        interceptorCfg.setInterceptorClassName( AUTHORIZATION_SERVICE_CLASS );
         list.add( interceptorCfg );
 
         interceptorCfg = new MutableInterceptorConfiguration();
-        interceptorCfg.setName( DefaultAuthorizationService.NAME );
-        interceptorCfg.setInterceptor( new DefaultAuthorizationService() );
+        interceptorCfg.setName( DEFAULT_AUTHORIZATION_SERVICE_NAME );
+        interceptorCfg.setInterceptorClassName( DEFAULT_AUTHORIZATION_SERVICE_CLASS );
         list.add( interceptorCfg );
 
         interceptorCfg = new MutableInterceptorConfiguration();
-        interceptorCfg.setName( ExceptionService.NAME );
-        interceptorCfg.setInterceptor( new ExceptionService() );
+        interceptorCfg.setName( EXCEPTION_SERVICE_NAME );
+        interceptorCfg.setInterceptorClassName( EXCEPTION_SERVICE_CLASS );
         list.add( interceptorCfg );
 
         interceptorCfg = new MutableInterceptorConfiguration();
-        interceptorCfg.setName( OperationalAttributeService.NAME );
-        interceptorCfg.setInterceptor( new OperationalAttributeService() );
+        interceptorCfg.setName( OPERATIONAL_ATTRIBUTE_SERVICE_NAME );
+        interceptorCfg.setInterceptorClassName( OPERATIONAL_ATTRIBUTE_SERVICE_CLASS );
         list.add( interceptorCfg );
 
         interceptorCfg = new MutableInterceptorConfiguration();
-        interceptorCfg.setName( SchemaService.NAME );
-        interceptorCfg.setInterceptor( new SchemaService() );
+        interceptorCfg.setName( SCHEMA_SERVICE_NAME );
+        interceptorCfg.setInterceptorClassName( SCHEMA_SERVICE_CLASS );
         list.add( interceptorCfg );
 
         interceptorCfg = new MutableInterceptorConfiguration();
-        interceptorCfg.setName( SubentryService.NAME );
-        interceptorCfg.setInterceptor( new SubentryService() );
+        interceptorCfg.setName( SUBENTRY_SERVICE_NAME );
+        interceptorCfg.setInterceptorClassName( SUBENTRY_SERVICE_CLASS );
         list.add( interceptorCfg );
 
         interceptorCfg = new MutableInterceptorConfiguration();
-        interceptorCfg.setName( CollectiveAttributeService.NAME );
-        interceptorCfg.setInterceptor( new CollectiveAttributeService() );
+        interceptorCfg.setName( COLLECTIVE_ATTRIBUTE_SERVICE_NAME );
+        interceptorCfg.setInterceptorClassName( COLLECTIVE_ATTRIBUTE_SERVICE_CLASS );
         list.add( interceptorCfg );
 
         interceptorCfg = new MutableInterceptorConfiguration();
-        interceptorCfg.setName( EventService.NAME );
-        interceptorCfg.setInterceptor( new EventService() );
+        interceptorCfg.setName( EVENT_SERVICE_NAME );
+        interceptorCfg.setInterceptorClassName( EVENT_SERVICE_CLASS );
         list.add( interceptorCfg );
         
         interceptorCfg = new MutableInterceptorConfiguration();
-        interceptorCfg.setName( TriggerService.NAME );
-        interceptorCfg.setInterceptor( new TriggerService() );
+        interceptorCfg.setName( TRIGGER_SERVICE_NAME );
+        interceptorCfg.setInterceptorClassName( TRIGGER_SERVICE_CLASS );
         list.add( interceptorCfg );
 
         setInterceptorConfigurations( list );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/EventService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/EventService.java?view=diff&rev=555477&r1=555476&r2=555477
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/EventService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/EventService.java Wed Jul 11 20:13:50 2007
@@ -83,9 +83,6 @@
 {
     private static Logger log = LoggerFactory.getLogger( EventService.class );
     
-    /** The service name */
-    public static final String NAME = "eventService";
-    
     private PartitionNexus nexus;
     private Map sources = new HashMap();
     private Evaluator evaluator = null;

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java?view=diff&rev=555477&r1=555476&r2=555477
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java Wed Jul 11 20:13:50 2007
@@ -73,9 +73,6 @@
  */
 public class ExceptionService extends BaseInterceptor
 {
-    /** The service name */
-    public static final String NAME = "exceptionService";
-
     private PartitionNexus nexus;
     private LdapDN subschemSubentryDn;
     

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java?view=diff&rev=555477&r1=555476&r2=555477
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java Wed Jul 11 20:13:50 2007
@@ -35,12 +35,12 @@
 
 import org.apache.directory.server.core.DirectoryServiceConfiguration;
 import org.apache.directory.server.core.configuration.InterceptorConfiguration;
-import org.apache.directory.server.core.configuration.MutableInterceptorConfiguration;
 import org.apache.directory.server.core.interceptor.context.OperationContext;
 import org.apache.directory.server.core.invocation.Invocation;
 import org.apache.directory.server.core.invocation.InvocationStack;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
+import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -207,10 +207,7 @@
      */
     public InterceptorChain()
     {
-        MutableInterceptorConfiguration tailCfg = new MutableInterceptorConfiguration();
-        tailCfg.setName( "tail" );
-        tailCfg.setInterceptor( FINAL_INTERCEPTOR );
-        tail = new Entry( null, null, tailCfg );
+        tail = new Entry( "tail", null, null, FINAL_INTERCEPTOR );
         head = tail;
     }
 
@@ -281,11 +278,11 @@
             {
                 try
                 {
-                    deregister( entry.configuration.getName() );
+                    deregister( entry.getName() );
                 }
                 catch ( Throwable t )
                 {
-                    log.warn( "Failed to deregister an interceptor: " + entry.configuration.getName(), t );
+                    log.warn( "Failed to deregister an interceptor: " + entry.getName(), t );
                 }
             }
         }
@@ -304,7 +301,7 @@
             return null;
         }
 
-        return e.configuration.getInterceptor();
+        return e.interceptor;
     }
 
 
@@ -318,7 +315,7 @@
         
         do
         {
-            result.add( e.configuration.getInterceptor() );
+            result.add( e.interceptor );
             e = e.nextEntry;
         }
         while ( e != tail );
@@ -351,7 +348,7 @@
     }
 
 
-    public synchronized InterceptorConfiguration remove( String interceptorName ) throws NamingException
+    public synchronized String remove( String interceptorName ) throws NamingException
     {
         return deregister( interceptorName );
     }
@@ -382,7 +379,7 @@
     /**
      * Removes and deinitializes the interceptor with the specified name.
      */
-    private InterceptorConfiguration deregister( String name ) throws ConfigurationException
+    private String deregister( String name ) throws ConfigurationException
     {
         Entry entry = checkOldName( name );
         Entry prevEntry = entry.prevEntry;
@@ -406,34 +403,73 @@
         }
 
         name2entry.remove( name );
-        entry.configuration.getInterceptor().destroy();
+        entry.interceptor.destroy();
 
-        return entry.configuration;
+        return entry.getName();
     }
 
+    
+    private Interceptor getInterceptorInstance( InterceptorConfiguration interceptorConfiguration ) 
+        throws NamingException
+    {
+        Class interceptorClass = null;
+        Interceptor interceptor = null;
+        
+        // Load the interceptor class and if we cannot find it blow a config exception
+        try
+        {
+            interceptorClass = Class.forName( interceptorConfiguration.getInterceptorClassName() );
+        }
+        catch( ClassNotFoundException e )
+        {
+            LdapConfigurationException lce = new LdapConfigurationException( "Failed to load interceptor class '" +
+                interceptorConfiguration.getInterceptorClassName() + "' for interceptor named '" +
+                interceptorConfiguration.getName() );
+            lce.setRootCause( e );
+            throw lce;
+        }
+        
+        // Now instantiate the interceptor
+        try
+        {
+            interceptor = ( Interceptor ) interceptorClass.newInstance();
+        }
+        catch ( Exception e )
+        {
+            LdapConfigurationException lce = 
+                new LdapConfigurationException( "Failed while trying to instantiate interceptor class '" +
+                interceptorConfiguration.getInterceptorClassName() + "' for interceptor named '" +
+                interceptorConfiguration.getName() );
+            lce.setRootCause( e );
+            throw lce;
+        }
+        
+        return interceptor;
+    }
+    
 
     private void register0( InterceptorConfiguration cfg, Entry nextEntry ) throws NamingException
     {
         String name = cfg.getName();
-        Interceptor interceptor = cfg.getInterceptor();
+        Interceptor interceptor = getInterceptorInstance( cfg );
         interceptor.init( factoryCfg, cfg );
 
         Entry newEntry;
         if ( nextEntry == head )
         {
-            newEntry = new Entry( null, head, cfg );
+            newEntry = new Entry( cfg.getName(), null, head, interceptor );
             head.prevEntry = newEntry;
             head = newEntry;
         }
         else if ( head == tail )
         {
-            newEntry = new Entry( null, tail, cfg );
+            newEntry = new Entry( cfg.getName(), null, tail, interceptor );
             tail.prevEntry = newEntry;
             head = newEntry;
         }
         else
         {
-            newEntry = new Entry( nextEntry.prevEntry, nextEntry, cfg );
+            newEntry = new Entry( cfg.getName(), nextEntry.prevEntry, nextEntry, interceptor );
             nextEntry.prevEntry.nextEntry = newEntry;
             nextEntry.prevEntry = newEntry;
         }
@@ -498,7 +534,7 @@
         Entry next = head;
         while ( next != tail )
         {
-            if ( invocation.isBypassed( next.configuration.getName() ) )
+            if ( invocation.isBypassed( next.getName() ) )
             {
                 next = next.nextEntry;
             }
@@ -515,7 +551,7 @@
     public Attributes getRootDSE( OperationContext opContext ) throws NamingException
     {
         Entry entry = getStartingEntry();
-        Interceptor head = entry.configuration.getInterceptor();
+        Interceptor head = entry.interceptor;
         NextInterceptor next = entry.nextInterceptor;
         
         try
@@ -537,7 +573,7 @@
     public LdapDN getMatchedName( OperationContext opContext ) throws NamingException
     {
         Entry entry = getStartingEntry();
-        Interceptor head = entry.configuration.getInterceptor();
+        Interceptor head = entry.interceptor;
         NextInterceptor next = entry.nextInterceptor;
 
         try
@@ -559,7 +595,7 @@
     public LdapDN getSuffix( OperationContext opContext ) throws NamingException
     {
         Entry entry = getStartingEntry();
-        Interceptor head = entry.configuration.getInterceptor();
+        Interceptor head = entry.interceptor;
         NextInterceptor next = entry.nextInterceptor;
         
         try
@@ -581,7 +617,7 @@
     public boolean compare( OperationContext opContext ) throws NamingException
     {
         Entry entry = getStartingEntry();
-        Interceptor head = entry.configuration.getInterceptor();
+        Interceptor head = entry.interceptor;
         NextInterceptor next = entry.nextInterceptor;
         
         try
@@ -603,7 +639,7 @@
     public Iterator listSuffixes( OperationContext opContext ) throws NamingException
     {
         Entry entry = getStartingEntry();
-        Interceptor head = entry.configuration.getInterceptor();
+        Interceptor head = entry.interceptor;
         NextInterceptor next = entry.nextInterceptor;
         
         try
@@ -625,7 +661,7 @@
     public void addContextPartition( OperationContext opContext ) throws NamingException
     {
         Entry entry = getStartingEntry();
-        Interceptor head = entry.configuration.getInterceptor();
+        Interceptor head = entry.interceptor;
         NextInterceptor next = entry.nextInterceptor;
         
         try
@@ -647,7 +683,7 @@
     public void removeContextPartition( OperationContext opContext ) throws NamingException
     {
         Entry entry = getStartingEntry();
-        Interceptor head = entry.configuration.getInterceptor();
+        Interceptor head = entry.interceptor;
         NextInterceptor next = entry.nextInterceptor;
         
         try
@@ -669,7 +705,7 @@
     public void delete( OperationContext opContext ) throws NamingException
     {
         Entry entry = getStartingEntry();
-        Interceptor head = entry.configuration.getInterceptor();
+        Interceptor head = entry.interceptor;
         NextInterceptor next = entry.nextInterceptor;
         
         try
@@ -690,7 +726,7 @@
     public void add( OperationContext opContext ) throws NamingException
     {
         Entry node = getStartingEntry();
-        Interceptor head = node.configuration.getInterceptor();
+        Interceptor head = node.interceptor;
         NextInterceptor next = node.nextInterceptor;
         
         try
@@ -711,7 +747,7 @@
     public void bind( OperationContext opContext ) throws NamingException
     {
         Entry node = getStartingEntry();
-        Interceptor head = node.configuration.getInterceptor();
+        Interceptor head = node.interceptor;
         NextInterceptor next = node.nextInterceptor;
         
         try
@@ -732,7 +768,7 @@
     public void unbind( OperationContext opContext ) throws NamingException
     {
         Entry node = getStartingEntry();
-        Interceptor head = node.configuration.getInterceptor();
+        Interceptor head = node.interceptor;
         NextInterceptor next = node.nextInterceptor;
         
         try
@@ -753,7 +789,7 @@
     public void modify( OperationContext opContext ) throws NamingException
     {
         Entry entry = getStartingEntry();
-        Interceptor head = entry.configuration.getInterceptor();
+        Interceptor head = entry.interceptor;
         NextInterceptor next = entry.nextInterceptor;
         
         try
@@ -795,7 +831,7 @@
     public NamingEnumeration list( OperationContext opContext ) throws NamingException
     {
         Entry entry = getStartingEntry();
-        Interceptor head = entry.configuration.getInterceptor();
+        Interceptor head = entry.interceptor;
         NextInterceptor next = entry.nextInterceptor;
         
         try
@@ -818,7 +854,7 @@
         throws NamingException
     {
         Entry entry = getStartingEntry();
-        Interceptor head = entry.configuration.getInterceptor();
+        Interceptor head = entry.interceptor;
         NextInterceptor next = entry.nextInterceptor;
         
         try
@@ -840,7 +876,7 @@
     public Attributes lookup( OperationContext opContext ) throws NamingException
     {
         Entry entry = getStartingEntry();
-        Interceptor head = entry.configuration.getInterceptor();
+        Interceptor head = entry.interceptor;
         NextInterceptor next = entry.nextInterceptor;
         
         try
@@ -862,7 +898,7 @@
     public boolean hasEntry( OperationContext opContext ) throws NamingException
     {
         Entry entry = getStartingEntry();
-        Interceptor head = entry.configuration.getInterceptor();
+        Interceptor head = entry.interceptor;
         NextInterceptor next = entry.nextInterceptor;
         
         try
@@ -884,7 +920,7 @@
     public void rename( OperationContext opContext ) throws NamingException
     {
         Entry entry = getStartingEntry();
-        Interceptor head = entry.configuration.getInterceptor();
+        Interceptor head = entry.interceptor;
         NextInterceptor next = entry.nextInterceptor;
         
         try
@@ -905,7 +941,7 @@
     public void move( OperationContext opContext ) throws NamingException
     {
         Entry entry = getStartingEntry();
-        Interceptor head = entry.configuration.getInterceptor();
+        Interceptor head = entry.interceptor;
         NextInterceptor next = entry.nextInterceptor;
         
         try
@@ -926,7 +962,7 @@
     public void moveAndRename( OperationContext opContext ) throws NamingException
     {
         Entry entry = getStartingEntry();
-        Interceptor head = entry.configuration.getInterceptor();
+        Interceptor head = entry.interceptor;
         NextInterceptor next = entry.nextInterceptor;
         
         try
@@ -952,21 +988,31 @@
 
         private Entry nextEntry;
 
-        private final InterceptorConfiguration configuration;
+        private final String name;
+        
+        private final Interceptor interceptor;
 
         private final NextInterceptor nextInterceptor;
 
+        
+        private final String getName()
+        {
+            return name;
+        }
 
-        private Entry(Entry prevEntry, Entry nextEntry, InterceptorConfiguration configuration)
+        
+        private Entry( String name, Entry prevEntry, Entry nextEntry, Interceptor interceptor )
         {
-            if ( configuration == null )
+            this.name = name;
+            
+            if ( interceptor == null )
             {
-                throw new NullPointerException( "configuration" );
+                throw new NullPointerException( "interceptor" );
             }
 
             this.prevEntry = prevEntry;
             this.nextEntry = nextEntry;
-            this.configuration = configuration;
+            this.interceptor = interceptor;
             this.nextInterceptor = new NextInterceptor()
             {
                 private Entry getNextEntry()
@@ -993,7 +1039,7 @@
                     Entry next = Entry.this.nextEntry;
                     while ( next != tail )
                     {
-                        if ( invocation.isBypassed( next.configuration.getName() ) )
+                        if ( invocation.isBypassed( next.getName() ) )
                         {
                             next = next.nextEntry;
                         }
@@ -1010,7 +1056,7 @@
                 public boolean compare( OperationContext opContext ) throws NamingException
                 {
                     Entry next = getNextEntry();
-                    Interceptor interceptor = next.configuration.getInterceptor();
+                    Interceptor interceptor = next.interceptor;
 
                     try
                     {
@@ -1031,7 +1077,7 @@
                 public Attributes getRootDSE( OperationContext opContext ) throws NamingException
                 {
                     Entry next = getNextEntry();
-                    Interceptor interceptor = next.configuration.getInterceptor();
+                    Interceptor interceptor = next.interceptor;
 
                     try
                     {
@@ -1052,7 +1098,7 @@
                 public LdapDN getMatchedName( OperationContext opContext ) throws NamingException
                 {
                     Entry next = getNextEntry();
-                    Interceptor interceptor = next.configuration.getInterceptor();
+                    Interceptor interceptor = next.interceptor;
 
                     try
                     {
@@ -1073,7 +1119,7 @@
                 public LdapDN getSuffix( OperationContext opContext ) throws NamingException
                 {
                     Entry next = getNextEntry();
-                    Interceptor interceptor = next.configuration.getInterceptor();
+                    Interceptor interceptor = next.interceptor;
 
                     try
                     {
@@ -1094,7 +1140,7 @@
                 public Iterator listSuffixes( OperationContext opContext ) throws NamingException
                 {
                     Entry next = getNextEntry();
-                    Interceptor interceptor = next.configuration.getInterceptor();
+                    Interceptor interceptor = next.interceptor;
 
                     try
                     {
@@ -1115,7 +1161,7 @@
                 public void delete( OperationContext opContext ) throws NamingException
                 {
                     Entry next = getNextEntry();
-                    Interceptor interceptor = next.configuration.getInterceptor();
+                    Interceptor interceptor = next.interceptor;
 
                     try
                     {
@@ -1135,7 +1181,7 @@
                 public void add( OperationContext opContext ) throws NamingException
                 {
                     Entry next = getNextEntry();
-                    Interceptor interceptor = next.configuration.getInterceptor();
+                    Interceptor interceptor = next.interceptor;
 
                     try
                     {
@@ -1155,7 +1201,7 @@
                 public void modify( OperationContext opContext ) throws NamingException
                 {
                     Entry next = getNextEntry();
-                    Interceptor interceptor = next.configuration.getInterceptor();
+                    Interceptor interceptor = next.interceptor;
 
                     try
                     {
@@ -1175,7 +1221,7 @@
                 public NamingEnumeration list( OperationContext opContext ) throws NamingException
                 {
                     Entry next = getNextEntry();
-                    Interceptor interceptor = next.configuration.getInterceptor();
+                    Interceptor interceptor = next.interceptor;
 
                     try
                     {
@@ -1197,7 +1243,7 @@
                     throws NamingException
                 {
                     Entry next = getNextEntry();
-                    Interceptor interceptor = next.configuration.getInterceptor();
+                    Interceptor interceptor = next.interceptor;
 
                     try
                     {
@@ -1218,7 +1264,7 @@
                 public Attributes lookup( OperationContext opContext ) throws NamingException
                 {
                     Entry next = getNextEntry();
-                    Interceptor interceptor = next.configuration.getInterceptor();
+                    Interceptor interceptor = next.interceptor;
 
                     try
                     {
@@ -1239,7 +1285,7 @@
                 public boolean hasEntry( OperationContext opContext ) throws NamingException
                 {
                     Entry next = getNextEntry();
-                    Interceptor interceptor = next.configuration.getInterceptor();
+                    Interceptor interceptor = next.interceptor;
 
                     try
                     {
@@ -1260,7 +1306,7 @@
                 public void rename( OperationContext opContext ) throws NamingException
                 {
                     Entry next = getNextEntry();
-                    Interceptor interceptor = next.configuration.getInterceptor();
+                    Interceptor interceptor = next.interceptor;
 
                     try
                     {
@@ -1280,7 +1326,7 @@
                 public void move( OperationContext opContext ) throws NamingException
                 {
                     Entry next = getNextEntry();
-                    Interceptor interceptor = next.configuration.getInterceptor();
+                    Interceptor interceptor = next.interceptor;
 
                     try
                     {
@@ -1301,7 +1347,7 @@
                     throws NamingException
                 {
                     Entry next = getNextEntry();
-                    Interceptor interceptor = next.configuration.getInterceptor();
+                    Interceptor interceptor = next.interceptor;
 
                     try
                     {
@@ -1321,7 +1367,7 @@
                 public void bind( OperationContext opContext ) throws NamingException
                 {
                     Entry next = getNextEntry();
-                    Interceptor interceptor = next.configuration.getInterceptor();
+                    Interceptor interceptor = next.interceptor;
     
                     try
                     {
@@ -1341,7 +1387,7 @@
                 public void unbind( OperationContext opContext ) throws NamingException
                 {
                     Entry next = getNextEntry();
-                    Interceptor interceptor = next.configuration.getInterceptor();
+                    Interceptor interceptor = next.interceptor;
 
                     try
                     {
@@ -1361,7 +1407,7 @@
                 public void addContextPartition( OperationContext opContext ) throws NamingException
                 {
                     Entry next = getNextEntry();
-                    Interceptor interceptor = next.configuration.getInterceptor();
+                    Interceptor interceptor = next.interceptor;
 
                     try
                     {
@@ -1382,7 +1428,7 @@
                 public void removeContextPartition( OperationContext opContext ) throws NamingException
                 {
                     Entry next = getNextEntry();
-                    Interceptor interceptor = next.configuration.getInterceptor();
+                    Interceptor interceptor = next.interceptor;
 
                     try
                     {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java?view=diff&rev=555477&r1=555476&r2=555477
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java Wed Jul 11 20:13:50 2007
@@ -31,6 +31,7 @@
 
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.authn.LdapPrincipal;
+import org.apache.directory.server.core.configuration.StartupConfiguration;
 import org.apache.directory.server.core.interceptor.context.CompareOperationContext;
 import org.apache.directory.server.core.interceptor.context.UnbindOperationContext;
 import org.apache.directory.server.core.referral.ReferralService;
@@ -65,7 +66,8 @@
     public ServerLdapContext( DirectoryService service, Hashtable env ) throws NamingException
     {
         super( service, env );
-        refService = (( ReferralService )service.getConfiguration().getInterceptorChain().get( ReferralService.NAME ) );        
+        refService = (( ReferralService )service.getConfiguration()
+            .getInterceptorChain().get( StartupConfiguration.REFERRAL_SERVICE_NAME ) );        
     }
 
 
@@ -79,7 +81,8 @@
     ServerLdapContext( DirectoryService service, LdapPrincipal principal, LdapDN dn ) throws NamingException
     {
         super( service, principal, dn );
-        refService = (( ReferralService )service.getConfiguration().getInterceptorChain().get( ReferralService.NAME ) );        
+        refService = (( ReferralService )service.getConfiguration()
+            .getInterceptorChain().get( StartupConfiguration.REFERRAL_SERVICE_NAME ) );        
     }
 
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationService.java?view=diff&rev=555477&r1=555476&r2=555477
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationService.java Wed Jul 11 20:13:50 2007
@@ -33,12 +33,7 @@
 import javax.naming.directory.Attributes;
 import javax.naming.directory.DirContext;
 
-import org.apache.directory.server.core.authn.AuthenticationService;
-import org.apache.directory.server.core.authz.AuthorizationService;
-import org.apache.directory.server.core.authz.DefaultAuthorizationService;
-import org.apache.directory.server.core.collective.CollectiveAttributeService;
-import org.apache.directory.server.core.event.EventService;
-import org.apache.directory.server.core.exception.ExceptionService;
+import org.apache.directory.server.core.configuration.StartupConfiguration;
 import org.apache.directory.server.core.interceptor.BaseInterceptor;
 import org.apache.directory.server.core.interceptor.Interceptor;
 import org.apache.directory.server.core.interceptor.NextInterceptor;
@@ -48,13 +43,7 @@
 import org.apache.directory.server.core.interceptor.context.OperationContext;
 import org.apache.directory.server.core.invocation.Invocation;
 import org.apache.directory.server.core.invocation.InvocationStack;
-import org.apache.directory.server.core.normalization.NormalizationService;
-import org.apache.directory.server.core.operational.OperationalAttributeService;
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
-import org.apache.directory.server.core.referral.ReferralService;
-import org.apache.directory.server.core.schema.SchemaService;
-import org.apache.directory.server.core.subtree.SubentryService;
-import org.apache.directory.server.core.trigger.TriggerService;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.KerberosKeyFactory;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.RandomKeyFactory;
@@ -97,18 +86,18 @@
     static
     {
         Set<String> c = new HashSet<String>();
-        c.add( NormalizationService.NAME );
-        c.add( AuthenticationService.NAME );
-        c.add( ReferralService.NAME );
-        c.add( AuthorizationService.NAME );
-        c.add( DefaultAuthorizationService.NAME );
-        c.add( ExceptionService.NAME );
-        c.add( OperationalAttributeService.NAME );
-        c.add( SchemaService.NAME );
-        c.add( SubentryService.NAME );
-        c.add( CollectiveAttributeService.NAME );
-        c.add( EventService.NAME );
-        c.add( TriggerService.NAME );
+        c.add( StartupConfiguration.NORMALIZATION_SERVICE_NAME );
+        c.add( StartupConfiguration.AUTHENTICATION_SERVICE_NAME );
+        c.add( StartupConfiguration.REFERRAL_SERVICE_NAME );
+        c.add( StartupConfiguration.AUTHORIZATION_SERVICE_NAME );
+        c.add( StartupConfiguration.DEFAULT_AUTHORIZATION_SERVICE_NAME );
+        c.add( StartupConfiguration.EXCEPTION_SERVICE_NAME );
+        c.add( StartupConfiguration.OPERATIONAL_ATTRIBUTE_SERVICE_NAME );
+        c.add( StartupConfiguration.SCHEMA_SERVICE_NAME );
+        c.add( StartupConfiguration.SUBENTRY_SERVICE_NAME );
+        c.add( StartupConfiguration.COLLECTIVE_ATTRIBUTE_SERVICE_NAME );
+        c.add( StartupConfiguration.EVENT_SERVICE_NAME );
+        c.add( StartupConfiguration.TRIGGER_SERVICE_NAME );
         USERLOOKUP_BYPASS = Collections.unmodifiableCollection( c );
     }
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationService.java?view=diff&rev=555477&r1=555476&r2=555477
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationService.java Wed Jul 11 20:13:50 2007
@@ -70,9 +70,6 @@
 {
     /** logger used by this class */
     private static final Logger log = LoggerFactory.getLogger( NormalizationService.class );
-    
-    /** The service name */
-    public static final String NAME = "normalizationService";
 
     /** a filter node value normalizer and undefined node remover */
     private NormalizingVisitor normVisitor;

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeService.java?view=diff&rev=555477&r1=555476&r2=555477
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeService.java Wed Jul 11 20:13:50 2007
@@ -77,9 +77,6 @@
  */
 public class OperationalAttributeService extends BaseInterceptor
 {
-    /** The service name */
-    public static final String NAME = "operationalAttributeService";
-
     private final SearchResultFilter DENORMALIZING_SEARCH_FILTER = new SearchResultFilter()
     {
         public boolean accept( Invocation invocation, SearchResult result, SearchControls controls ) 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java?view=diff&rev=555477&r1=555476&r2=555477
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java Wed Jul 11 20:13:50 2007
@@ -41,10 +41,8 @@
 
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.DirectoryServiceConfiguration;
-import org.apache.directory.server.core.authn.AuthenticationService;
-import org.apache.directory.server.core.authz.AuthorizationService;
-import org.apache.directory.server.core.authz.DefaultAuthorizationService;
 import org.apache.directory.server.core.configuration.PartitionConfiguration;
+import org.apache.directory.server.core.configuration.StartupConfiguration;
 import org.apache.directory.server.core.enumeration.SearchResultFilter;
 import org.apache.directory.server.core.enumeration.SearchResultFilteringEnumeration;
 import org.apache.directory.server.core.event.EventService;
@@ -54,12 +52,6 @@
 import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
 import org.apache.directory.server.core.invocation.Invocation;
 import org.apache.directory.server.core.invocation.InvocationStack;
-import org.apache.directory.server.core.normalization.NormalizationService;
-import org.apache.directory.server.core.operational.OperationalAttributeService;
-import org.apache.directory.server.core.referral.ReferralService;
-import org.apache.directory.server.core.schema.SchemaService;
-import org.apache.directory.server.core.subtree.SubentryService;
-import org.apache.directory.server.core.trigger.TriggerService;
 import org.apache.directory.shared.ldap.exception.LdapSizeLimitExceededException;
 import org.apache.directory.shared.ldap.exception.LdapTimeLimitExceededException;
 import org.apache.directory.shared.ldap.filter.ExprNode;
@@ -112,38 +104,38 @@
     static
     {
         Collection<String> c = new HashSet<String>();
-        c.add( NormalizationService.NAME );
-        c.add( AuthenticationService.NAME );
-        c.add( AuthorizationService.NAME );
-        c.add( DefaultAuthorizationService.NAME );
-        c.add( SchemaService.NAME );
-        c.add( SubentryService.NAME );
-        c.add( OperationalAttributeService.NAME );
-        c.add( ReferralService.NAME );
-        c.add( EventService.NAME );
+        c.add( StartupConfiguration.NORMALIZATION_SERVICE_NAME );
+        c.add( StartupConfiguration.AUTHENTICATION_SERVICE_NAME );
+        c.add( StartupConfiguration.AUTHORIZATION_SERVICE_NAME );
+        c.add( StartupConfiguration.DEFAULT_AUTHORIZATION_SERVICE_NAME );
+        c.add( StartupConfiguration.SCHEMA_SERVICE_NAME );
+        c.add( StartupConfiguration.SUBENTRY_SERVICE_NAME );
+        c.add( StartupConfiguration.OPERATIONAL_ATTRIBUTE_SERVICE_NAME );
+        c.add( StartupConfiguration.REFERRAL_SERVICE_NAME );
+        c.add( StartupConfiguration.EVENT_SERVICE_NAME );
         LOOKUP_BYPASS = Collections.unmodifiableCollection( c );
 
         c = new HashSet<String>();
-        c.add( AuthenticationService.NAME );
-        c.add( AuthorizationService.NAME );
-        c.add( DefaultAuthorizationService.NAME );
-        c.add( SchemaService.NAME );
-        c.add( SubentryService.NAME );
-        c.add( OperationalAttributeService.NAME );
-        c.add( ReferralService.NAME );
-        c.add( EventService.NAME );
+        c.add( StartupConfiguration.AUTHENTICATION_SERVICE_NAME );
+        c.add( StartupConfiguration.AUTHORIZATION_SERVICE_NAME );
+        c.add( StartupConfiguration.DEFAULT_AUTHORIZATION_SERVICE_NAME );
+        c.add( StartupConfiguration.SCHEMA_SERVICE_NAME );
+        c.add( StartupConfiguration.SUBENTRY_SERVICE_NAME );
+        c.add( StartupConfiguration.OPERATIONAL_ATTRIBUTE_SERVICE_NAME );
+        c.add( StartupConfiguration.REFERRAL_SERVICE_NAME );
+        c.add( StartupConfiguration.EVENT_SERVICE_NAME );
         GETMATCHEDDN_BYPASS = Collections.unmodifiableCollection( c );
 
     	c = new HashSet<String>();
-    	c.add( NormalizationService.NAME );
-    	c.add( AuthenticationService.NAME );
-    	c.add( AuthorizationService.NAME );
-    	c.add( DefaultAuthorizationService.NAME );
-    	c.add( SchemaService.NAME );
-    	c.add( SubentryService.NAME );
-    	c.add( ReferralService.NAME );
-    	c.add( EventService.NAME );
-    	c.add( TriggerService.NAME );
+    	c.add( StartupConfiguration.NORMALIZATION_SERVICE_NAME );
+    	c.add( StartupConfiguration.AUTHENTICATION_SERVICE_NAME );
+    	c.add( StartupConfiguration.AUTHORIZATION_SERVICE_NAME );
+    	c.add( StartupConfiguration.DEFAULT_AUTHORIZATION_SERVICE_NAME );
+    	c.add( StartupConfiguration.SCHEMA_SERVICE_NAME );
+    	c.add( StartupConfiguration.SUBENTRY_SERVICE_NAME );
+    	c.add( StartupConfiguration.REFERRAL_SERVICE_NAME );
+    	c.add( StartupConfiguration.EVENT_SERVICE_NAME );
+    	c.add( StartupConfiguration.TRIGGER_SERVICE_NAME );
     	LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS = Collections.unmodifiableCollection( c );
     }
 
@@ -790,7 +782,7 @@
                                    NamingListener namingListener ) throws NamingException
     {
         InterceptorChain chain = this.configuration.getInterceptorChain();
-        EventService interceptor = ( EventService ) chain.get( EventService.NAME );
+        EventService interceptor = ( EventService ) chain.get( StartupConfiguration.EVENT_SERVICE_NAME );
         interceptor.addNamingListener( ctx, name, filter, searchControls, namingListener );
     }
 
@@ -802,7 +794,7 @@
         {
             return;
         }
-        EventService interceptor = ( EventService ) chain.get( EventService.NAME );
+        EventService interceptor = ( EventService ) chain.get( StartupConfiguration.EVENT_SERVICE_NAME );
         interceptor.removeNamingListener( ctx, namingListener );
     }
 }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java?view=diff&rev=555477&r1=555476&r2=555477
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java Wed Jul 11 20:13:50 2007
@@ -38,14 +38,11 @@
 import javax.naming.directory.SearchResult;
 
 import org.apache.directory.server.core.DirectoryServiceConfiguration;
-import org.apache.directory.server.core.authn.AuthenticationService;
-import org.apache.directory.server.core.authz.AuthorizationService;
-import org.apache.directory.server.core.authz.DefaultAuthorizationService;
 import org.apache.directory.server.core.configuration.InterceptorConfiguration;
+import org.apache.directory.server.core.configuration.StartupConfiguration;
 import org.apache.directory.server.core.enumeration.ReferralHandlingEnumeration;
 import org.apache.directory.server.core.enumeration.SearchResultFilter;
 import org.apache.directory.server.core.enumeration.SearchResultFilteringEnumeration;
-import org.apache.directory.server.core.event.EventService;
 import org.apache.directory.server.core.interceptor.BaseInterceptor;
 import org.apache.directory.server.core.interceptor.NextInterceptor;
 import org.apache.directory.server.core.interceptor.context.AddContextPartitionOperationContext;
@@ -60,14 +57,9 @@
 import org.apache.directory.server.core.invocation.Invocation;
 import org.apache.directory.server.core.invocation.InvocationStack;
 import org.apache.directory.server.core.jndi.ServerLdapContext;
-import org.apache.directory.server.core.normalization.NormalizationService;
-import org.apache.directory.server.core.operational.OperationalAttributeService;
 import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
-import org.apache.directory.server.core.schema.SchemaService;
-import org.apache.directory.server.core.subtree.SubentryService;
-import org.apache.directory.server.core.trigger.TriggerService;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.server.schema.registries.OidRegistry;
 import org.apache.directory.shared.ldap.NotImplementedException;
@@ -98,9 +90,6 @@
  */
 public class ReferralService extends BaseInterceptor
 {
-    /** The service name */
-    public static final String NAME = "referralService";
-    
     private static final Logger log = LoggerFactory.getLogger( ReferralService.class );
     private static final String IGNORE = "ignore";
     private static final String THROW_FINDING_BASE = "throw-finding-base";
@@ -124,16 +113,16 @@
          * partitions of the system during startup and during add/remove partition ops
          */
         Collection<String> c = new HashSet<String>();
-        c.add( NormalizationService.NAME );
-        c.add( AuthenticationService.NAME );
-        c.add( AuthorizationService.NAME );
-        c.add( DefaultAuthorizationService.NAME );
-        c.add( SchemaService.NAME );
-        c.add( SubentryService.NAME );
-        c.add( OperationalAttributeService.NAME );
-        c.add( ReferralService.NAME );
-        c.add( EventService.NAME );
-        c.add( TriggerService.NAME );
+        c.add( StartupConfiguration.NORMALIZATION_SERVICE_NAME );
+        c.add( StartupConfiguration.AUTHENTICATION_SERVICE_NAME );
+        c.add( StartupConfiguration.AUTHORIZATION_SERVICE_NAME );
+        c.add( StartupConfiguration.DEFAULT_AUTHORIZATION_SERVICE_NAME );
+        c.add( StartupConfiguration.SCHEMA_SERVICE_NAME );
+        c.add( StartupConfiguration.SUBENTRY_SERVICE_NAME );
+        c.add( StartupConfiguration.OPERATIONAL_ATTRIBUTE_SERVICE_NAME );
+        c.add( StartupConfiguration.REFERRAL_SERVICE_NAME );
+        c.add( StartupConfiguration.EVENT_SERVICE_NAME );
+        c.add( StartupConfiguration.TRIGGER_SERVICE_NAME );
         SEARCH_BYPASS = Collections.unmodifiableCollection( c );
     }
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaManager.java?view=diff&rev=555477&r1=555476&r2=555477
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaManager.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaManager.java Wed Jul 11 20:13:50 2007
@@ -35,17 +35,11 @@
 
 import org.apache.directory.server.constants.ApacheSchemaConstants;
 import org.apache.directory.server.constants.MetaSchemaConstants;
-import org.apache.directory.server.core.authn.AuthenticationService;
-import org.apache.directory.server.core.authz.AuthorizationService;
-import org.apache.directory.server.core.authz.DefaultAuthorizationService;
-import org.apache.directory.server.core.collective.CollectiveAttributeService;
-import org.apache.directory.server.core.exception.ExceptionService;
+import org.apache.directory.server.core.configuration.StartupConfiguration;
 import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
 import org.apache.directory.server.core.invocation.Invocation;
 import org.apache.directory.server.core.invocation.InvocationStack;
 import org.apache.directory.server.core.jndi.ServerLdapContext;
-import org.apache.directory.server.core.normalization.NormalizationService;
-import org.apache.directory.server.core.referral.ReferralService;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.server.schema.registries.ObjectClassRegistry;
 import org.apache.directory.server.schema.registries.OidRegistry;
@@ -178,14 +172,14 @@
         VALID_OU_VALUES.add( SchemaConstants.DIT_STRUCTURE_RULES_AT.toLowerCase() );
         
         HashSet<String> set = new HashSet<String>();
-        set.add( NormalizationService.NAME );
-        set.add( AuthenticationService.NAME );
-        set.add( ReferralService.NAME );
-        set.add( AuthorizationService.NAME );
-        set.add( DefaultAuthorizationService.NAME );
-        set.add( ExceptionService.NAME );
-        set.add( SchemaService.NAME );
-        set.add( CollectiveAttributeService.NAME );
+        set.add( StartupConfiguration.NORMALIZATION_SERVICE_NAME );
+        set.add( StartupConfiguration.AUTHENTICATION_SERVICE_NAME );
+        set.add( StartupConfiguration.REFERRAL_SERVICE_NAME );
+        set.add( StartupConfiguration.AUTHORIZATION_SERVICE_NAME );
+        set.add( StartupConfiguration.DEFAULT_AUTHORIZATION_SERVICE_NAME );
+        set.add( StartupConfiguration.EXCEPTION_SERVICE_NAME );
+        set.add( StartupConfiguration.SCHEMA_SERVICE_NAME );
+        set.add( StartupConfiguration.COLLECTIVE_ATTRIBUTE_SERVICE_NAME );
         SCHEMA_MODIFICATION_ATTRIBUTES_UPDATE_BYPASS = Collections.unmodifiableCollection( set );
     }
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java?view=diff&rev=555477&r1=555476&r2=555477
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java Wed Jul 11 20:13:50 2007
@@ -115,9 +115,6 @@
     /** The LoggerFactory used by this Interceptor */
     private static Logger log = LoggerFactory.getLogger( SchemaService.class );
 
-    /** The service name */
-    public static final String NAME = "schemaService";
-
     private static final String[] EMPTY_STRING_ARRAY = new String[0];
     private static final String BINARY_KEY = JndiPropertyConstants.JNDI_LDAP_ATTRIBUTES_BINARY;
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java?view=diff&rev=555477&r1=555476&r2=555477
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java Wed Jul 11 20:13:50 2007
@@ -28,15 +28,11 @@
 import javax.naming.directory.Attributes;
 
 import org.apache.directory.server.constants.MetaSchemaConstants;
-import org.apache.directory.server.core.authn.AuthenticationService;
-import org.apache.directory.server.core.authz.AuthorizationService;
-import org.apache.directory.server.core.authz.DefaultAuthorizationService;
-import org.apache.directory.server.core.exception.ExceptionService;
+import org.apache.directory.server.core.configuration.StartupConfiguration;
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
 import org.apache.directory.server.core.invocation.InvocationStack;
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
-import org.apache.directory.server.core.referral.ReferralService;
 import org.apache.directory.server.schema.bootstrap.Schema;
 import org.apache.directory.server.utils.AttributesFactory;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
@@ -72,12 +68,12 @@
     static
     {
         Set<String> bypass = new HashSet<String>();
-        bypass.add( AuthenticationService.NAME );
-        bypass.add( ReferralService.NAME );
-        bypass.add( AuthorizationService.NAME );
-        bypass.add( DefaultAuthorizationService.NAME );
-        bypass.add( ExceptionService.NAME );
-        bypass.add( SchemaService.NAME );
+        bypass.add( StartupConfiguration.AUTHENTICATION_SERVICE_NAME );
+        bypass.add( StartupConfiguration.REFERRAL_SERVICE_NAME );
+        bypass.add( StartupConfiguration.AUTHORIZATION_SERVICE_NAME );
+        bypass.add( StartupConfiguration.DEFAULT_AUTHORIZATION_SERVICE_NAME );
+        bypass.add( StartupConfiguration.EXCEPTION_SERVICE_NAME );
+        bypass.add( StartupConfiguration.SCHEMA_SERVICE_NAME );
         BYPASS = Collections.unmodifiableCollection( bypass );
     }
     



Mime
View raw message