|
[
Permalink
| « Hide
]
Eric Rauer added a comment - 27/Feb/07 12:22 AM
Can this be handled by setting the context referral property to follow when creating the context? That should allow the jndi code to handle the referrals instead of passing the referral exception. See the jndi tutorial for more info, http://java.sun.com/products/jndi/tutorial/ldap/referral/jndi.html
Yes, that should work with most LDAP servers (and btw you can specify this property using the baseEnvironmentPropertes property of ContextSource if your server does support it). Doesn't work for Active Directory however, as AD is unable to automatically follow referrals. On AD you'll need to do the work yourself.
Is this new information something that should be added to the reference doc (if not already there)?
I'm not sure if this is even a problem that can be addressed from inside the framework. We keep on moving it forward; maybe we should just close it with Won't Fix...
See
Also worth noting that when the context is set follow referrals, AD does not return the PartialResultsException that org.springframework.ldap.core.LdapTemplate#setIgnorePartialResultException is used to skip. However, you will either need to set your client host to use a DNS server holding entries for the spurious zones and configuration referrals returned by AD, e.g. search reference search reference search reference or use the Global Catalog server (port 3268). Thanks Nate for the elaborate explanation on this. With the resolution of
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||