Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 21608 invoked from network); 30 Dec 2007 01:04:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Dec 2007 01:04:01 -0000 Received: (qmail 66794 invoked by uid 500); 30 Dec 2007 01:03:49 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 66748 invoked by uid 500); 30 Dec 2007 01:03: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 66737 invoked by uid 99); 30 Dec 2007 01:03:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 29 Dec 2007 17:03:49 -0800 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 72.14.220.156 as permitted sender) Received: from [72.14.220.156] (HELO fg-out-1718.google.com) (72.14.220.156) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Dec 2007 01:03:25 +0000 Received: by fg-out-1718.google.com with SMTP id e12so2132424fga.3 for ; Sat, 29 Dec 2007 17:03:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:content-type:content-transfer-encoding; bh=sNPD01c032BNHgTCJ9uGpdD43+Y2DG2jXYeY/TKOSZU=; b=wDn49Fj5jTBktaFZk9s95MVxufOeB9N6tq23XrGWbfGma8fdyDxCNZZvzXJ2i93b5pZsBBYT6k6suZIgtTtKZTcTr7VrHaDIZ1q7JjLs9C+P505VspnF5Zfl2PgUh4uXkTqq0v7TFDl/55qShJgvEhYJ8zL2olxCW3Z0xG/4p0Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:content-type:content-transfer-encoding; b=brhi4BJVgnCJrr7XgfX+L4eeAUTNxL2OHzyPSY8kbwe8T4BDzDXzQ+OQOJ+ZzQAtGL6F2lz+CHtHxL3JMFA468RQwD1u+qhXf8sYbB9UbZ7zGlgWbudlMnHyBMjAXsDqrFW6/bqUf0BFQaDH88YOafO/o8BtURsa8PRwZyRQJ1s= Received: by 10.86.61.13 with SMTP id j13mr10589255fga.48.1198976608640; Sat, 29 Dec 2007 17:03:28 -0800 (PST) Received: from ?192.168.0.1? ( [82.66.216.176]) by mx.google.com with ESMTPS id e20sm12001708fga.1.2007.12.29.17.03.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 29 Dec 2007 17:03:27 -0800 (PST) Message-ID: <4776EE36.8020605@gmail.com> Date: Sun, 30 Dec 2007 02:02:46 +0100 From: Emmanuel Lecharny User-Agent: Thunderbird 1.5.0.14pre (X11/20071023) MIME-Version: 1.0 To: Apache Directory Developers List Subject: ServerEntry : one more step... Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, FYI : I have modified the getRootDSE operation to use only ServerEntry into it. I thought it would be an easy task, as it's a very limited operation, but I was plain wrong ... I would say first that I'm almost done : I still have one nasty error in server-utils (all integ tests are now running). But I had to fight with many problems : - The rootDSE is initialized deep into the server, so it implied a lot of cleanup (like defining some new constants for each of the elements stored in the rootDSE) - I also changed all the operationContext to store the Registries inside (it was quite boring, but went smoothly). As a consequence, I had to modify a lot of interceptors to be able to get the registries reference. - As those operationContexts are used in places where we don't have access to the registries, I had to add a lot of parameters to many functions. - The ServerEntry/ServerAttribute API appeared to be far from perfect :) Lot of bugs, side effects, and missing operations. This is still a work in progress - The setContextEntry() method has also been changed to handle a ServerEntry : this was _painfull_, as the addition of a partition may be done _before_ the registries initialisation... As ServerEntry needs an access to the registries, I finally decided to add a setContextAttr() method, for this very special case : we use an Attributes which will be transformed to a ServerEntry later, when the registries is set. I know, this is an ugly disgusting hack ... - Another dirty hack is the way we handle the NamingContexts. For some reasons, we store an empty NamingContext (a null value) which is not used, I guess (or is it for the rootDSE ???), and this has some very strange and not funny side-effects. It has to be reviewed. Right now, after a long long day of coding, i'm fed up. I still have to add a new set of methods to the ServerAttribute class : we have 'put', but we also need 'add'. The 'put' method will replace the existing attribute/value with a new one(s), when the 'add' method simply add new attribute/value. The API needs some cleaning and polishing, but I must say that we are now close to an usable API. I didn't found any big breach in it, except that the fact we need to pass a Registries/AttributeTypeRegistry each time we want to create a new ServerEntry or a new ServerAttribute is more than painfull. It would be much better to have factories for such tasks... So far, 133 references to Attribute, Attributes, AttributeImpl and AttributesImpl have been removed from the server... More or less 2.77% of all the references ! The pace is a little bit too slow, as it will takes 68 days and a half to get rid of all those classes ! (let say 40 days, as 40% of those references are in tests...). January won't be funny ... Commit is for tomorrow. -- -- cordialement, regards, Emmanuel L�charny www.iktek.com directory.apache.org