[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: how to get the source of jldap



Brett @Google wrote:
On Fri, Jul 3, 2009 at 7:20 PM, Howard Chu <hyc@symas.com> wrote:

 Also available from the OpenLDAP Project:

   * JLDAP - LDAP Class Libraries for Java


Is there any reason to prefer this implementation over the jdk supplied LDAP
API ?
There are no JDK LDAP API. There is just an horrible API called JNDI.

For anyone who have experienced both of them, it's crystal clear that jLdap is way better.

Just as an exemple, have a look at http://java.sun.com/docs/books/tutorial/jndi/ldap/operations.html.

Associating a 'compare' operation to a 'search' operation is a nonsense. Even worse, the JNDI 'Bind' operation is semantically a totally confusing thing. Not to mention the traps you can fell in, one of the most obvious is to forget to close a NamingEnumeration if you don't grab all the results : closing the connection is not enough, the connection is still considered as being locked. The perfect way to exhaust a pool of connection, or to quickly get an OOM.

Did I mention the atrocious BasicAttributes() constructor which *must* be used with a 'true' parameter, otherwise you will quickly have problems when using case sensitive attributeType names ?

Still want to use JNDI ?

--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org