Implementation of timeout in LDAP

拜拜、爱过 提交于 2019-12-06 08:59:29
Sudheer S

I found a solution. I have added the following property in my ldap.xml file. So far it worked for me.

<bean id="contextSourceTargetApp" 
      class="org.springframework.ldap.core.support.LdapContextSource">
    <property name="baseEnvironmentProperties">
        <map>
            <entry key="com.sun.jndi.ldap.connect.timeout" value="5000" />          
        </map>  
    </property>
</bean>

Please post any other solution if you have any idea about LDAP timeout implementation.

For ActiveDirectoryLdapAuthenticationProvider the solution with ldap.xml file did not work for me. Instead I added a jndi.properties file to the classpath with the following content:

com.sun.jndi.ldap.connect.timeout=500
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!