-
Jul 29th, 2010, 01:47 PM
#1
Setting Connection timeout in Spring LDAP.
Hi ,
I am using the Spring LDAP for doing the LDAP lookup.
I am not setting the timeout and letting it to use the default one.
Application took 21 sec to return result.
I want to set the connection timeout value as 4 sec.
Please advice me on the way to do it.
my xml entries:
<bean id="contextSource"
class="org.springframework.ldap.pool.factory.Pooli ngContextSource">
<property name="contextSource" ref="contextSourceTarget" />
<property name="dirContextValidator" ref="dirContextValidator" />
<property name="testOnBorrow" value="${ldap.testOnBorrow}" />
<property name="testWhileIdle" value="${ldap.testWhileIdle}" />
</bean>
<bean id="dirContextValidator"
class="org.springframework.ldap.pool.validation.De faultDirContextValidator" />
<bean id="contextSourceTarget"
class="org.springframework.ldap.core.support.LdapC ontextSource">
<property name="url" value="${ldap.host}" />
<property name="userDn" value="${ldap.userDn}" />
<property name="password" value="${ldap.password}" />
<property name="pooled" value="${ldap.pooled}" />
</bean>
<bean id="ldapTemplate"
class="org.springframework.ldap.core.LdapTemplate" >
<constructor-arg ref="contextSourceTarget" />
Please treat this as urgent
Thanks
Vinoth
-
Jul 30th, 2010, 04:54 PM
#2
Vinoth,
Assuming that your LDAP search is taking 21 seconds to complete, here are few posts that can help you:
http://forum.springsource.org/showthread.php?t=56578
http://forum.springsource.org/showthread.php?t=39648
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules