What is Spring LDAP?
Spring LDAP is a result of applying the template approach found in
for example JdbcTemplate, in the JNDI world. Spring LDAP aims to
eliminate the need for writing raw JNDI/LDAP applications.
Key Features
- Simplifies Coding: The LdapTemplate class encapsulates all the
plumbing work involved in traditional LDAP programming, such as
creating a DirContext, looping through NamingEnumerations, handling
exceptions and cleaning up resources. This leaves the programmer to
handle the important stuff - where to find data (DNs and Filters) and
what do do with it (map to and from domain objects, bind, modify,
unbind, etc.), in the same way that JdbcTemplate relieves the
programmer of all but the actual SQL and how the data maps to the
domain model.
- Pooling Library: The built-in JNDI pooling support is very
limited, and actually has a few deficiencies. Spring LDAP provides a
much more flexible and powerful pooling library.
- LDIF Parsing Library: The LDIF parsing library provides an LDIF
parser utility compliant with "RFC 2849 : The LDAP Data Interchange
Format (LDIF) - Technical Specification". It also includes classes
for using the LDIF parser with the
Spring Batch
framework.
- Object-Directory Mapping (ODM) Framework: The ODM framework
provides the ability to use annotations to map LDAP entities and
attributes to Java objects, similar to what relational mapping
frameworks like Hibernate and JPA have offered for some time.
- Reuses your Spring expertise: Spring LDAP uses Spring application
contexts for all configuration, which should help Spring developers get
up-to-speed nice and quickly. Also, the architecture of Spring LDAP
resembles that of Spring JDBC.
- Supports Transactions: The LDAP standard does not specify transaction support.
Spring LDAP provides a client-side compensating transaction library to fill the void.
- Integrates with Spring Security: The authentication system of Spring LDAP provides
integration with Spring Security.
In fact, Spring Security uses Spring LDAP for its LDAP integration.
- Built by Maven: This assists you in effectively reusing the Spring LDAP artifacts
in your own Maven-based projects.
- Apache license. You can confidently use Spring LDAP in your project.