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