ldapsdk
ldapsdk copied to clipboard
Replace BindRequest for new connections in LDAPConnectionPool
Hi there,
We are using LDAP SDK to connect to an LDAP server, and periodically the password for the bindDN used in the pool to create new connections is enforced to be changed by the users administrators.
Today the bindDN and the password are config parameters of the application. WHen the password is changed in runtime, we are closing the actual pool and creating a new one on the fly, but I think could be interesting addind in the pool a method like "setNewBindRequestNewConnections(BindRequest request)" that is really doind the job.
Checking LDAPPoolCode I think should be enough to make bindRequest field as volatile and create new method as suggested.
DO you think is an interesting functionality to be added?
Thanks in advance
This is a reasonable request. I also think it could be useful to update the server set on the fly. I'll look into updating the connection pool implementations to support this.
I have updated the LDAPConnectionPool and LDAPThreadLocalConnectionPool classes to add new setBindRequest and setServerSet methods.
Thanks a lot for accepting the suggestion.
I was checking the commit and it is really great how the code is documented and tested. Thanks again