Concurrent ldap search in the same thread
807573Jan 29 2003 — edited Jan 29 2003Hi,
I try to send in parallel several ldap search request to an iDS5.0 SP1 ldap server. The ldap client is java coded using LDAP SDK.
To emphasis my problem, I wrote a very simple ldap client:
A first request is sent to the ldap server. 200 entries matches the search criteria;
searchListener = _ld.search("ou=city0, ou=region0, ou=LoadTest, o=surpass.com",1,"(cn=*)",attrs,false,null, searchConstraints);
I read the 5 first messages sent back by the ldap server:
while (true) {
ldapMessage=searchListener.getResponse();
nbEntries++;
if (nbEntries>5) break;
}
Without waiting for the resultCode message, I send a new ldap search:
ldapSearchResults = _ld.search("ou=city1, ou=region1, ou=LoadTest, o=surpass.com",1,"(cn=*)",attrs,false,searchConstraints);
This search locks the java process. A timeout message is generated in the ldap server logs:
[27/Jan/2003:14:13:35 +0100] conn=60660 op=2 fd=48 closed error 11 (Resource temporarily unavailable) - B4
Is it a bug? Or is it mandatory, in a single thread process, to wait for the resultCode message before sending any other search request?
Yannick