Oh, and there is no risk for to many connection open by construction of LdapConnectionProvider: there is only two kind of provider, monoconnection and pooled ones. For the first kind, there is at most one connection. For the second, it's the pool manager that managed the number of connection based on its configuration (but it's not our responsibility).