Hi all - this is the first time I’m using the Apache DS API, migrating over 
from the JNDI and Netscape libraries.

The "5 minute example" page has several errors on it, I'm guessing because it 
hasn't been updated for the 2.0 API.

Here's what I've found (not trying to nitpick, but it's probably worth fixing 
now - just that whole "first impression" notion...)

The connection example is incorrect on how to create an LdapConnection, since 
that is an interface. It should instead read:

     LdapConnection connection = new LdapNetworkConnection( "localhost", 389 );

Also the search method returns a different object now:

        EntryCursor cursor = connection.search("ou=system", "(objectclass=*)", 
SearchScope.ONELEVEL, "*");

        while (cursor.next()) {
            Entry nextEntry = cursor.get();
            // process the entry...
        }

Best regards,

Richard




Reply via email to