In our environment, the size limit of the search return for AD is set to 1000. so the LDAPEntrySource only contains 1000 entries, how can I go fetch next 1000?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks dirmgr. The condition check (cookie != null) in example code is not sufficient for me, the cookie is not null when the result reached last page, so I had to add cookie.getValueLength() != 0 in order to properly exit the loop
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello, dirmgr
In our environment, the size limit of the search return for AD is set to 1000. so the LDAPEntrySource only contains 1000 entries, how can I go fetch next 1000?
You should use the simple paged results control to perform the search in multiple steps. See http://www.unboundid.com/products/ldapsdk/docs/javadoc/com/unboundid/ldap/sdk/controls/SimplePagedResultsControl.html for more information about this control and an example showing how to use it.
Thanks dirmgr. The condition check (cookie != null) in example code is not sufficient for me, the cookie is not null when the result reached last page, so I had to add cookie.getValueLength() != 0 in order to properly exit the loop