Make ldap to jcr synchronized in order to avoid error when parallel authentications
authorMathieu Baudier <mbaudier@argeo.org>
Wed, 21 Sep 2011 18:36:52 +0000 (18:36 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Wed, 21 Sep 2011 18:36:52 +0000 (18:36 +0000)
git-svn-id: https://svn.argeo.org/commons/trunk@4747 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

security/runtime/org.argeo.security.ldap/src/main/java/org/argeo/security/ldap/jcr/JcrUserDetailsContextMapper.java

index 537e01763c8a0507bdd4c8e60236b212694cb6c1..8cac6a7097a7f699ae3d585c7cbba87c2b9d586d 100644 (file)
@@ -108,7 +108,7 @@ public class JcrUserDetailsContextMapper implements UserDetailsContextMapper,
        }
 
        /** @return path to the user home node */
-       protected String mapLdapToJcr(String username, DirContextOperations ctx) {
+       protected synchronized String mapLdapToJcr(String username, DirContextOperations ctx) {
                String usernameLdap = ctx.getStringAttribute(usernameAttribute);
                // log.debug("username=" + username + ", usernameLdap=" + usernameLdap);
                if (!username.equals(usernameLdap)) {