directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ole Ersoy <ole.er...@gmail.com>
Subject Re: [JNDI] Getting the Directory Context From a Binding?
Date Tue, 12 Jun 2007 13:25:06 GMT
Hi Stefan,

Super!  I thought they were a little magical :-)  I'll start getting cozy with search.  In
this case I just wanted to get the Attributes of each entry, so that I can get the name of
the entry, so that I can delete it.  BTW - I started reworking the ADS Testing Archetype.
 Do you have any needs for a testing archetype in LS?  I know the DAS needs a separate one,
because it has 10 or so different setups for tests to use, and I thought LS might have similar
needs.  If you would like one, just let me know and I can work on them in parallel.

Thanks again,
- Ole



Stefan Seelmann wrote:
> Hi,
> 
> in Studio we don't use the
>  Context.list()
>  Context.listBindings()
>  Context.lookup()
>  Context.bind()
> methods. The reason is that JNDI performs magic LDAP request when using 
> this methods. JNDI tries to find out if the object in LDAP is a Java 
> object.
> 
> Instead we just use the
>  search(String name, String filter, SearchControls cons)
> method because it gives full control which LDAP request is performed 
> against the server. With the SearchControls you can exactly specify the 
> search scope (object, one level, subtree), the returned attributes, the 
> count and time limits. However with that method you just get the 
> SearchResult objects containing the LDAP attributes, there is no 
> LDAP->Object mapping when using this method.
> 
> You could take a look to the JNDIConnectionContext class, it does all 
> the I/O to the directory.
> http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/JNDIConnectionContext.java?view=markup

> 
> (It is not documented yet and we are on the way to refactor the 
> connection part of the Studio)
> 
> Hope that help,
> StefanS
> 
> 
> Ole Ersoy wrote:
> 
>> OK Cool - I can always hunt through the LS code base and see how it's 
>> done there.  At least I know someone is doing it :-)
>>
>> Cheers,
>> - Ole
>>
>>
>>
>>
>>
> 

Mime
View raw message