In CR 6747875 we have documented that if an LDAP server responds with many thousands of entries, a client could stop with an "java.lang.OutOfMemoryError: Java heap space" if the request results cannot be processed fast enough. The feature called Paged Results Control has been suggested in order to control the rate of arrival of LDAP results. However, this approach doesn't work with each LDAP server.
This request is to improve the actual jndi producer/consumer implementation in order to make it working even if a LDAP server don't support the Paged Results Control feature.
A testcase is attached to the CR.