During concurrent calls to LDAPDirectory#getSession(), it is possible that new sessions aren't registered because there is no synchronization when registering them.
Moreover, the method LDAPSession#close() may raise an exception before closing the session: closing the session should be moved in a finally block.
Same problems with SQLDirectory and MultiDirectory