Announcement Announcement Module
Collapse
No announcement yet.
Setting Connection timeout in Spring LDAP. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #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

    Comment

    Working...
    X