Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 74971 invoked from network); 27 Sep 2008 10:13:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Sep 2008 10:13:19 -0000 Received: (qmail 33340 invoked by uid 500); 27 Sep 2008 10:13:17 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 33269 invoked by uid 500); 27 Sep 2008 10:13:16 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 33257 invoked by uid 99); 27 Sep 2008 10:13:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 27 Sep 2008 03:13:16 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of elecharny@gmail.com designates 209.85.128.191 as permitted sender) Received: from [209.85.128.191] (HELO fk-out-0910.google.com) (209.85.128.191) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 27 Sep 2008 10:12:15 +0000 Received: by fk-out-0910.google.com with SMTP id e30so1245122fke.9 for ; Sat, 27 Sep 2008 03:12:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:user-agent :mime-version:to:subject:references:in-reply-to:content-type :content-transfer-encoding:from; bh=BcOVYKSXQbSHbJLxcwG2dKeq7snCOgugF6Vke9y+FK0=; b=E1HQRRsevGcGFxjhM3kvtrIBnRO8ODGXNsXK7x77Z1aJpHWaiO69zGWkTxwanoJrSN VL+D2RDuI5CBX4K8BO4vUuqHsCenY1ftjRVAbKVhvJjz0P7HIW3xscojBF0PTvauXVfw MOWs/1uui03asNr3e7nzpLrBmpLUkur9lUCkc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding:from; b=mgTSrPokhYbnI/8KI12dByYEM0w5yOn1xNqhGsufiD/YR+5t/UXH9Ac3PRyHUSsBGv rSr6z8hZd0WuLgo9x0T/dqnujC4ODQ9f1s7ZK3KuUH1HRXHmullKFgYJvXtOCpRi0bVL wTpbLJ7JhfI9PRdWtG33zSfhIK4QCbCS7364I= Received: by 10.103.49.7 with SMTP id b7mr1795774muk.3.1222510368177; Sat, 27 Sep 2008 03:12:48 -0700 (PDT) Received: from ?192.168.0.11? ( [82.66.216.176]) by mx.google.com with ESMTPS id j9sm11870527mue.3.2008.09.27.03.12.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 27 Sep 2008 03:12:47 -0700 (PDT) Message-ID: <48DE071D.8000005@nextury.com> Date: Sat, 27 Sep 2008 12:12:45 +0200 User-Agent: Thunderbird 2.0.0.16 (X11/20080724) MIME-Version: 1.0 To: Apache Directory Developers List Subject: Re: JNDI vs protocol vs Core API References: <48DD237F.2040907@nextury.com> <48DD800C.40903@nextury.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit From: Emmanuel Lecharny X-Virus-Checked: Checked by ClamAV on apache.org Alex Karasulu wrote: >> well, I don't think we should see the referral handling this way. IIf you >> see it from another perspective, ie, from the user POV, a referral is just >> an indirection. Now, the way the server manage it is pretty much a black box >> for the client, as soon as the client is informed that the entry is not >> present in the server. If you consider that you want to embed the server, >> but without using JNDI, you are in a dead end. >> > > > I don't think we're in a dead end. It's up to the user of the CoreSession > and Entry interfaces to determine what to do with the referral if they don't > want to use the JNDI wrapper. It's that simple. > > What more do you think needs to be done? For example if you do a lookup > via: > > session.lookup( "ou=People,dc=foo" ) > > and dc=foo is a referral to dc=bar but ou=People does not exist. In this > case what exception do you throw? Something telling you the entry does not > exist or an exception stating a referral needs to be handled? If you want > referral handling to occur here in CoreSession methods then, the exception > thrown will depend on the presence of the ManageDsaIT control's presence. > A NoSuchObjectException, from the top of my head, which is not good enough for the client. I think that the core session should throw a PartialResultException if one of the ancestor is a referral, or a ReferralException if the entry is a referral and there is no ManageDsaIT control. In fact, the little thin layer (or may be some small modification in CoreSession) should just do that : check if the ManageDsaIt control is present (it may be a simple boolean passed into the OpContext, no need to pass the full control), and throw the correct exception or the entry, depending on the cases. The JNDI and protocol layers will then just have to deal with those exceptions accordingly to their own semantic. One last thing is that we may have to implement the 'follow' mechanism into the JNDI layer, as it's very specific to JNDI. > If you don't implement referral handling here then upper levels must check > with the ReferralManager to see if the dn of the missing entry has a > referral ancestor. I guess this is a good argument to implement some > minimal referral handling in the CoreSession then. > Yep. > What does the Netscape API do? Maybe that may shed some light. > I can check that.