John Marmion <[EMAIL PROTECTED]> writes:
> Hi Dan,
>
> I managed top sort out the MessageListener functionality
> and get a simple implementation working. I used the
> nsLDAPChannel code as a guide. Was this meant as an
> example or to be used as is? Anyway, I have a couple
> of further queries to ask you.
Well, the channel code is working code that will run display ldap:
URLs in the browser, which is why it was written. But some of the
error-handling, cancellation code, and cleanup code is undone and/or
has thread-safety problems. Leif and I will be looking into
resurrecting the current unused nsLDAPService so that it manages and
cleans up connections better, which will make it easier to get
nsLDAPChannel doing the right thing.
> I notice that on the return from the SimpleBind that you
> call the SearchExt(). I wondered why you did it that way as
> opposed to having an explicit SearchExt() call.
Two reasons:
* LDAPv2 requires a bind before any other operation, and I hadn't
entirely decided on LDAPv2 vs. V3. More on that later in this message.
* At some point, the channel should be able to support
authentication, which requires the bind step even in LDAPv3.
> Should we create a separate operation for each LDAP
> request and share the connection object ?
Yes, that's how it's intended. Furthermore, the nsLDAPService hacking
mentioned above will allow multiple clients of the XPCOM wrapper to
share a single connection. When you want a connection, you'll ask the
service for one with a specific (host, port, bindname) tuple, and it
will give you back either an existing connection or create a new one.
> Should we be concerned about V2 and V3 of the LDAP
> implementation.
Leif and I were talking to Mark Smith (one of the LDAP C SDK wizards)
about this, and his suggestion was to try V3 to start, and fall back
to V2 if necessary. Right now, we're not doing anything that requires
V3 features, so this particular problem hasn't yet bubbled to the top
of our list. The current code in nsLDAPConnection::Init() just uses
the default of V2. I'll try and get Mark's permission to forward our
discussion to this list.
Dan