Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 45392 invoked from network); 23 May 2008 23:09:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 May 2008 23:09:07 -0000 Received: (qmail 44830 invoked by uid 500); 23 May 2008 23:09:09 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 44783 invoked by uid 500); 23 May 2008 23:09:09 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 44774 invoked by uid 99); 23 May 2008 23:09:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 May 2008 16:09:09 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 May 2008 23:08:30 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 1033223889C1; Fri, 23 May 2008 16:08:47 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@directory.apache.org From: akarasulu@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080523230847.1033223889C1@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 );