About JNDI DirContextSource

A JNDI DirContext factory which works very much like a JDBC DataSource returning ready-to-use DirContext objects.

It is meant to ease the pain of setting up a LDAP connection without memorizing all the necessary environment properties. A builder class with a fluent API supports you to construct a DirContextSource to retrieve objects from.

This library has by no means any pooling capability like Tomcat JDBC Pool or similar it is rather designed to work like a regular object factory, i.e., it always returns a new object.

Getting Started

Download the artifact, read the user guide and get started.

Origin of this Project

I was working with directory servers, Active Directory for example, in many projects in my company for several years now and was tired of writing the same boilerplate connection and configuration code over and over again. Finally, I decided to write an easy to use factory inspired by JDBC's DataSource and Spring's ContextSource with convention over configuration in mind. This library has been in production in several projects, e.g., directly within Apache Tomcat or the Spring Framework, for more than a year now with great success.