Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 79313 invoked from network); 19 May 2006 15:34:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 May 2006 15:34:50 -0000 Received: (qmail 81396 invoked by uid 500); 19 May 2006 15:34:49 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 81342 invoked by uid 500); 19 May 2006 15:34:49 -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 81331 invoked by uid 99); 19 May 2006 15:34:49 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 May 2006 08:34:49 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of elecharny@gmail.com designates 66.249.92.170 as permitted sender) Received: from [66.249.92.170] (HELO ug-out-1314.google.com) (66.249.92.170) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 May 2006 08:34:48 -0700 Received: by ug-out-1314.google.com with SMTP id a2so780984ugf for ; Fri, 19 May 2006 08:34:27 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ImcDCUE0baE28omZzFNWogmzklUV1nGZPBZnx279GZ7OREWNp0k/20ORReuCU3UMq0vzU+j5ahYune4Hk13dNAA3wZ0hRl1SWGNrEZjixc+YWhWtHs0/3JMggQFtiNZUNfNpUxli0kW5xp/QPCEtdTXZmnfyyapdSa/la0rw6fg= Received: by 10.66.6.29 with SMTP id 29mr1527133ugf; Fri, 19 May 2006 08:34:27 -0700 (PDT) Received: by 10.66.236.3 with HTTP; Fri, 19 May 2006 08:34:26 -0700 (PDT) Message-ID: Date: Fri, 19 May 2006 17:34:26 +0200 From: "Emmanuel Lecharny" Reply-To: elecharny@apache.org To: "Apache Directory Developers List" Subject: Re: How to separate LDAP protocol handler? In-Reply-To: <20060516233012.0F36C470356@avs2.arnes.si> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20060516233012.0F36C470356@avs2.arnes.si> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi ! we have already saw your first post, sorry that nobody replied, but a lot of ADS developpers are at JavaOne currently... You will have to wait a few days :( However, for what you are doing, may be the best would be just to erase the content of each handlers (Bind, Search) and to map your own logic inside. Just keep the objects that you receive which contains the request values. Modifying the Map does not really make sense as the handlers are tightly related to Ldap operations. Do you need to use a LdapContext at all? Emmanuel On 5/17/06, Jaka Jaksic wrote: > Hi! > > > We've been trying, with no luck, to accomplish something that should be > quite simple. What we want to do is to create a tiny LDAP server serving > simple read-only content (a list of users) from our database. According t= o > ApacheDS homepage, that should be easily doable by using only the LDAP > protocol provider, which is supposed to be nicely separable from the rest= of > the product. However, everything seems to be very tightly coupled, to the > point where I find this seemingly simple task pretty much impossible to d= o > (at least without nasty hacking). > > I'm pretty sure we're missing something here, but we couldn't find any > useful documentation on this topic, and also the link to Alex's presentat= ion > on ApacheCon04 (which is supposed explain the architecture and integratio= n > in greater detail) doesn't work. > > Here's what we found out about the code so far, which I think prevents th= e > protocol handler from being used separately: > > 1. LdapProtocolHandler creates the handlers in a static block and places > them in an unmodifiable map, which prevents handlers from being replaced. > > 2. SearchHandler seems to depend on ServerLdapContext (ctx =3D ( > ServerLdapContext ) unknown), which prevents using another LdapContext > implementation. > > 3. DefaultDirectoryService and DefaultDirectoryServiceConfiguration are > package private and rewriting them from scratch seems like a lot of > unnecessary work. > > All we would really need is to just plug in our own LdapContext or > SearchHandler and remove the underlying directory implementation. Or > something which would provide the same effect. > > I'll be very grateful for any kind of advice! > > > Thanks and regards, > Jaka > > --=20 Cordialement, Emmanuel L=E9charny