Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 68286 invoked from network); 8 Aug 2005 07:09:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 8 Aug 2005 07:09:26 -0000 Received: (qmail 22606 invoked by uid 500); 8 Aug 2005 07:09:26 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 22562 invoked by uid 500); 8 Aug 2005 07:09:26 -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 22548 invoked by uid 99); 8 Aug 2005 07:09:26 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Aug 2005 00:09:26 -0700 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 08 Aug 2005 00:09:15 -0700 Received: (qmail 68267 invoked by uid 65534); 8 Aug 2005 07:09:25 -0000 Message-ID: <20050808070925.68260.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r230764 - /directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/DefaultContextPartitionNexus.java Date: Mon, 08 Aug 2005 07:09:24 -0000 To: commits@directory.apache.org From: trustin@apache.org X-Mailer: svnmailer-1.0.3 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: trustin Date: Mon Aug 8 00:09:20 2005 New Revision: 230764 URL: http://svn.apache.org/viewcvs?rev=230764&view=rev Log: Moved DefaultContextPartitionNexus.destroy() code into removeContextPartition() Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/DefaultContextPartitionNexus.java Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/DefaultContextPartitionNexus.java URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/DefaultContextPartitionNexus.java?rev=230764&r1=230763&r2=230764&view=diff ============================================================================== --- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/DefaultContextPartitionNexus.java (original) +++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/DefaultContextPartitionNexus.java Mon Aug 8 00:09:20 2005 @@ -245,18 +245,16 @@ MultiException error = null; - Iterator list = this.partitions.values().iterator(); + Iterator suffixes = new HashSet( this.partitions.keySet() ).iterator(); // make sure this loop is not fail fast so all backing stores can // have an attempt at closing down and synching their cached entries - while ( list.hasNext() ) + while ( suffixes.hasNext() ) { - ContextPartition partition = ( ContextPartition ) list.next(); - + String suffix = (String) suffixes.next(); try { - partition.sync(); - partition.destroy(); + removeContextPartition( new LdapName( suffix ) ); } catch ( NamingException e ) { @@ -379,11 +377,12 @@ throw new NameNotFoundException( "No partition with suffix: " + key ); } - partition.destroy(); - partitions.remove( key ); - Attribute namingContexts = rootDSE.get( NAMINGCTXS_ATTR ); namingContexts.remove( partition.getSuffix( false ).toString() ); + partitions.remove( key ); + + partition.sync(); + partition.destroy(); } public ContextPartition getSystemPartition()