directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1156084 - /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
Date Wed, 10 Aug 2011 09:44:42 GMT
Author: elecharny
Date: Wed Aug 10 09:44:41 2011
New Revision: 1156084

URL: http://svn.apache.org/viewvc?rev=1156084&view=rev
Log:
Synchronized the partitionLookupTree where needed

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java?rev=1156084&r1=1156083&r2=1156084&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
Wed Aug 10 09:44:41 2011
@@ -946,7 +946,11 @@ public class DefaultPartitionNexus exten
         }
 
         // Update the partition tree
-        partitionLookupTree.remove( partition.getSuffixDn() );
+        synchronized ( partitionLookupTree )
+        {
+            partitionLookupTree.remove( partition.getSuffixDn() );
+        }
+        
         partitions.remove( key );
 
         try
@@ -965,7 +969,12 @@ public class DefaultPartitionNexus exten
      */
     public Partition getPartition( Dn dn ) throws LdapException
     {
-        Partition parent = partitionLookupTree.getElement( dn );
+        Partition parent = null;
+        
+        synchronized ( partitionLookupTree )
+        {
+            parent = partitionLookupTree.getElement( dn );
+        }
 
         if ( parent == null )
         {



Mime
View raw message