Le 13/12/16 à 13:06, Greg Thomas a écrit :
> I'm looking to use the LDAP API in preference to JDNI.
>
> One thing I'm struggling to find the equivalent of a base DN for the whole
> connection.
>
> With JNDI, I can supply a connection string similar to ...
>
> ldap://my-host:389/*OU=sub-domain,OU=domain,o=com*
>
>
> which means that all searches will always start under "sub-domain".
>
> Now, obviously I can append ",*OU=sub-domain,OU=domain,o=com*" to all my
> DNs that I'm searching (either that exact String, or by using the Dn class
> I guess), but is there any way I can set that at a connection level? I
> can't see anything obvious in the API, and I'm hoping to avoid having to
> set it for everything I'm searching for.

No, we don't define a 'Context' in the LDAP API, as JNDI does. You have
to provide the complete DN.


-- 
Emmanuel Lecharny

Symas.com
directory.apache.org

Reply via email to