Brett @Google wrote:
On Fri, Jul 3, 2009 at 7:20 PM, Howard Chu <hyc(a)symas.com>
> 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
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
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 ?