directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Karasulu <akaras...@apache.org>
Subject Re: [Referrals] How do we handle Context.REFERRAL property inside the server
Date Tue, 13 Feb 2007 01:39:37 GMT
Emmanuel Lecharny wrote:
> Hi guys,
> 
> we have had a short convo yesturday with Alex about how the server is 
> supposed to handle the JNDI Context.REFERRAL property. Basically, tis 
> property can be set by a JNDI client to enforce a behavior when the 
> server send back a referral :
> " A JNDI application uses the Context.REFERRAL 
> <http://java.sun.com/j2se/1.3/docs/api/javax/naming/Context.html#REFERRAL> 
> (in the API reference documentation) 
> <http://java.sun.com/j2se/1.3/docs/api/javax/naming/Context.html#REFERRAL> 
> ("java.naming.referral") environment property to indicate to the service 
> providers how to handle referrals"

Let me quickly add to this to help summarize the problem.

(1) JNDI is a client side API
(2) LDAP JNDI providers have this option to follow referrals on your behalf
(3) Apache Directory Server has a server-side LDAP JNDI provider *NOT* 
intended for use to contact remote servers.

Conclusion
----------

Do not support the Context.REFERRAL option when set to 'follow'.  If the 
user does so a LdapOperationNotSupported exception (NOTE the Ldap 
prefix) should be thrown.

> However, the server might not be seen as a Ldap Service Provider per se. 
> Ifg you read the tutorial further, there is a clear indication that the 
> server does not handle this property :

The stuff below is from the LDAP JNDI Provider Implementors guidelines 
document from SUN I guess or the JNDI tutorial?

> " Continuation references can be mixed in with search results returned 
> by an LDAP "search" operation. For example, when searching a directory, 
> the server might return several search results, in addition to a few 
> continuation references that show where to obtain further results. These 
> results and references might be interleaved at the protocol level. When 
> the Context.REFERRAL property is set to "follow", the LDAP service 
> provider processes all the normal entries first, before following the 
> continuation references. When this property is set to "throw", all of 
> normal entries are returned in the enumeration first, before the 
> ReferralException is thrown."
> 
> So far, so good. But we have a problem : ADS is offering a JNDI 
> interface, thus must handle this Context.REFERRAL property. So the 
> question is :
> -  How do we have to handle this poperty into the server? Should we 
> simply ignore it, just dealing with the control, or should we try to 
> implement all the mechanism to handle the FOLLOW ?

IMO we should eventually add support for the follow value of this 
property but this complicates several things and we need to get to a 
point where we have weighed the advantages from the disadvantages of 
doing this.  I don't think anyone understands right now the 
ramifications of doing this.  I'm comfortable just capping it off by 
making this value unsupported for now.  Then putting in a JIRA for 
adding this features later.

Alex

Mime
View raw message