Table of Contents
A little-known--and probably underestimated--feature of the Java
LDAP API is the ability to register a DirObjectFactory
to automatically create objects from found contexts. One of the reasons
why it is seldom used is that you will need an implementation of
DirObjectFactory that creates instances of a meaningful
implementation of DirContext. The Spring LDAP library
provides the missing pieces: a default implementation of
DirContext called DirContextAdapter,
and a corresponding implementation of DirObjectFactory
called DefaultDirObjectFactory. Used together with
DefaultDirObjectFactory, the
DirContextAdapter can be a very powerful tool.