Implementation of timeout in LDAP
问题 I have been handling an application in which we are using LDAP to fetch user details. Sometimes it will take more time to fetch user details. I want to implement time out on methods that fetch details so that we can avoid hanging transactions in server in worst case. Here we are using LdapUtil class in which we have configured LdapTemplate class to fetch the required details. How can we implement timeout on LDAP methods? (In this case ldapTemplate.search(...) methods) public class LdapUtil {