directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r659708 - /directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
Date Fri, 23 May 2008 23:08:46 GMT
Author: akarasulu
Date: Fri May 23 16:08:45 2008
New Revision: 659708

URL: http://svn.apache.org/viewvc?rev=659708&view=rev
Log:
fixing checken and egg problem with interceptors and bootstrap entries required for server
operation

Modified:
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?rev=659708&r1=659707&r2=659708&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
Fri May 23 16:08:45 2008
@@ -773,7 +773,6 @@
         }
 
         initialize();
-        firstStart = createBootstrapEntries();
         showSecurityWarnings();
         started = true;
         
@@ -1069,26 +1068,29 @@
             serverEntry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime()
);
 
             partitionNexus.add( new AddOperationContext( registries, serverEntry ) );
-            
-            Interceptor authzInterceptor = interceptorChain.get( AciAuthorizationInterceptor.class.getName()
);
-            
-            if ( authzInterceptor == null )
-            {
-                LOG.error( "The Authorization service is null : this is not allowed" );
-                throw new NamingException( "The Authorization service is null" );
-            }
-            
-            if ( !( authzInterceptor instanceof AciAuthorizationInterceptor ) )
-            {
-                LOG.error( "The Authorization service is not set correctly : '{}' is an incorect
interceptor",
-                    authzInterceptor.getClass().getName() );
-                throw new NamingException( "The Authorization service is incorrectly set"
);
-                
-            }
-
-            AciAuthorizationInterceptor authzSrvc = ( AciAuthorizationInterceptor ) authzInterceptor;
-            authzSrvc.cacheNewGroup( name, serverEntry );
 
+            // TODO - confirm if we need this at all since the 
+            // group cache on initialization after this stage will
+            // search the directory for all the groups anyway
+            
+//            Interceptor authzInterceptor = interceptorChain.get( AciAuthorizationInterceptor.class.getName()
);
+//            
+//            if ( authzInterceptor == null )
+//            {
+//                LOG.error( "The Authorization service is null : this is not allowed" );
+//                throw new NamingException( "The Authorization service is null" );
+//            }
+//            
+//            if ( !( authzInterceptor instanceof AciAuthorizationInterceptor ) )
+//            {
+//                LOG.error( "The Authorization service is not set correctly : '{}' is an
incorect interceptor",
+//                    authzInterceptor.getClass().getName() );
+//                throw new NamingException( "The Authorization service is incorrectly set"
);
+//                
+//            }
+//
+//            AciAuthorizationInterceptor authzSrvc = ( AciAuthorizationInterceptor ) authzInterceptor;
+//            authzSrvc.cacheNewGroup( name, serverEntry );
         }
 
         // -------------------------------------------------------------------
@@ -1402,6 +1404,9 @@
         partitionNexus.init( this );
         partitionNexus.addContextPartition( new AddContextPartitionOperationContext( registries,
schemaPartition ) );
 
+        // Create all the bootstrap entries before initializing chain
+        firstStart = createBootstrapEntries();
+
         interceptorChain = new InterceptorChain();
         interceptorChain.init( this );
 



Mime
View raw message