I’ve been working on a project that required line by line processing of 38,000 records. Each one of those lines required a ldap query. This eventually caused the LDAP calls to fail, as each <CFLDAP> call was incurring an unclosed connection, and the pool of the local server was being filled.
<CFLDAP> has no ability to manipulate the connection like you can with <CFFTP>. Therefore I needed to find a way of controlling the connection. Eventually I stumbled onto Dave Ross’s site which had a lot of information about using JLDAP with ColdFusion.
Using the information there I built a CFC that uses JLDAP to manipulate ldap like <CFLDAP>. Hopefully, it can be of use to someone else out there.