Update of 
/var/cvs/applications/cloudcontext/src/org/mmbase/security/implementation/cloudcontext/builders
In directory james.mmbase.org:/tmp/cvs-serv23689

Modified Files:
        Users.java 
Log Message:
should fix   MMB-1669


See also: 
http://cvs.mmbase.org/viewcvs/applications/cloudcontext/src/org/mmbase/security/implementation/cloudcontext/builders
See also: http://www.mmbase.org/jira/browse/MMB-1669


Index: Users.java
===================================================================
RCS file: 
/var/cvs/applications/cloudcontext/src/org/mmbase/security/implementation/cloudcontext/builders/Users.java,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -b -r1.55 -r1.56
--- Users.java  13 Jun 2008 09:58:42 -0000      1.55
+++ Users.java  30 Jun 2008 08:16:20 -0000      1.56
@@ -31,7 +31,7 @@
  * @author Eduard Witteveen
  * @author Pierre van Rooden
  * @author Michiel Meeuwissen
- * @version $Id: Users.java,v 1.55 2008/06/13 09:58:42 nklasens Exp $
+ * @version $Id: Users.java,v 1.56 2008/06/30 08:16:20 michiel Exp $
  * @since  MMBase-1.7
  */
 public class Users extends MMObjectBuilder {
@@ -527,6 +527,7 @@
     protected void invalidateCaches(int nodeNumber) {
         rankCache.remove(new Integer(nodeNumber));
 
+        synchronized(userCache.getLock()) {
         Iterator<Map.Entry<String,MMObjectNode>> i =  
userCache.entrySet().iterator();
         while (i.hasNext()) {
             Map.Entry<String,MMObjectNode> entry = i.next();
@@ -541,6 +542,7 @@
             }
         }
     }
+    }
 
 
     public boolean nodeChanged(String machine, String number, String builder, 
String ctype) {
@@ -555,6 +557,7 @@
 
             MMObjectNode node = getNode(number);
             Map<String,MMObjectNode> users = new 
HashMap<String,MMObjectNode>();
+            synchronized(userCache.getLock()) {
             Iterator<Map.Entry<String,MMObjectNode>> i = 
userCache.entrySet().iterator();
             while (i.hasNext()) {
                 Map.Entry<String,MMObjectNode> entry = i.next();
@@ -569,6 +572,7 @@
                     }
                 }
             }
+            }
             userCache.putAll(users);
         }
         return true;
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to