带有池的Spring LDAP身份验证方法-UnsupportedOperationException [英] Spring LDAP authenticate method with Pooling - UnsupportedOperationException
问题描述
我正在使用Spring LDAP 2.0.0.RELEASE,并且在启用了ldap池的情况下使用新的ldapTemplate.authenticate(LdapQuery,password)方法遇到了错误.我收到错误消息:
I'm using Spring LDAP 2.0.0.RELEASE and am getting an error using the new ldapTemplate.authenticate(LdapQuery, password) method with ldap pooling turned on. I get the error:
java.lang.UnsupportedOperationException:此实现不支持
java.lang.UnsupportedOperationException: Not supported for this implementation
仅当我在applicationContext.xml中具有ldap:pooling标记时,才会出现此错误
I only get this error when I have the ldap:pooling tag in my applicationContext.xml
当我删除它时,该方法成功运行.知道为什么身份验证不适用于ldap池吗?池化似乎可以与其他ldapTemplate方法配合使用.
When I remove this, the method works successfully. Any idea why authenticate doesn't work with ldap pooling? Pooling seems to work fine with other ldapTemplate methods.
推荐答案
为了对用户进行身份验证,ContextSource执行绑定,这是通过使用指定的专有名称和密码创建新连接来完成的.因此,这些连接无法合并.
In order to authenticate the user the ContextSource performs a bind, which is accomplished by creating a new connection with the specified distinguished name and password. Due to this, these connections cannot be pooled.
这篇关于带有池的Spring LDAP身份验证方法-UnsupportedOperationException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!