Return-Path: X-Original-To: apmail-directory-dev-archive@www.apache.org Delivered-To: apmail-directory-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 94F8A9919 for ; Wed, 19 Oct 2011 07:21:15 +0000 (UTC) Received: (qmail 77875 invoked by uid 500); 19 Oct 2011 07:21:14 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 77812 invoked by uid 500); 19 Oct 2011 07:21:13 -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 77577 invoked by uid 99); 19 Oct 2011 07:21:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Oct 2011 07:21:07 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of elecharny@gmail.com designates 74.125.82.44 as permitted sender) Received: from [74.125.82.44] (HELO mail-ww0-f44.google.com) (74.125.82.44) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Oct 2011 07:20:59 +0000 Received: by wwe6 with SMTP id 6so2072580wwe.1 for ; Wed, 19 Oct 2011 00:20:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=IPMyOgv/+mBbpef/Rq0ZQeD5cIIu7/pCk6toEXta0T8=; b=u0bTL0kr9mpmfDFiv6GX8YXNEMKyDtfw19k9iWRQLbYNo10H7EvwMXJiL2t4mB6eKU uzUhhei03bGgNUZNNjTAVpAiF4xhN52+FPSDUPBiV6Giwa4q991bER2KqaFlFwZZNGCf fQK/Oav3LHGdkk052ijmeU2WARSGrt1mw5GGY= Received: by 10.227.176.70 with SMTP id bd6mr801137wbb.3.1319008838508; Wed, 19 Oct 2011 00:20:38 -0700 (PDT) Received: from emmanuel-lecharnys-MacBook-Pro.local (ran75-1-78-192-106-184.fbxo.proxad.net. [78.192.106.184]) by mx.google.com with ESMTPS id i29sm8035843wbp.22.2011.10.19.00.20.37 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 19 Oct 2011 00:20:37 -0700 (PDT) Message-ID: <4E9E7A44.3080800@gmail.com> Date: Wed, 19 Oct 2011 09:20:36 +0200 From: Emmanuel Lecharny Reply-To: elecharny@apache.org User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Apache Directory Developers List Subject: Re: [ApacheDS 2.0] OSGI, Implementing Services References: <4E9D88E6.1000705@apache.org> <7926A93F-4D93-40AE-9F01-2603460AF696@marcelot.net> In-Reply-To: <7926A93F-4D93-40AE-9F01-2603460AF696@marcelot.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org On 10/19/11 9:08 AM, Pierre-Arnaud Marcelot wrote: > Hi Göktürk, > > On 19 oct. 2011, at 06:35, Göktürk Gezer wrote: > >> Hi Emmanuel, >> >> I'm doing some experiments on DS. I saw some problems on our way. Before diving deeper i must consult you about somethings. >> >> I'm changing the way we deal with schema elements(LdapComparator,Normalizer,SyntaxChecker) so that they will be pluggable. Schema manager tries to classload them that's where i'm going to change. I'll make SchemaManager get them through OSGI, but while i change the core parts, there are lots of place on the code that use them as tool(Tests espacially). > Although I'm 100% positive to move ApacheDS as a whole into OSGI, I'm *really* not sure the LDAP API should rely on OSGI features for it's extensibility. > > As an API, it's meant to be used by many third party developers and I personally think we can't afford to be only compatible with OSGI. I'm afraid we still need to support the API as a set of simple jars (that's why we added the 'standalone' project at the time with Alex, supporting both OSGI and non-OSGI environments). To some extent, I feel a bit the same. It would be a real pain if we require that our users include an OSGi container in order to use our API. Now, is there a way to keep the schema elements class-loaded, without having to make them bundles ? > >> And once the class is manipulated with IPojo, it is not so easy to instantiate it through normal ways. Before solving that topic i must know what do you think about below issues: >> >> 1- Tests are using them heavily. So changing the way we load them will broke these unit tests. So we must change them to be OSGI compatible. I'm talking aside from OSGI integration tests. These changes will make these unit tests unable to run without OSGI.(Pax-Exam will be used most probably) > Indeed, the framework will need, just like the ApacheDS service project, to start it's own embedded OSGI container (Felix or Karaf) and launch the server through it. I think that it's not really a big issue, as we just need to modify the test framework we use. > >> 2- Because more than one instances of the ApacheDS may be launched inside same JVM. We must either provide same copies of these schema elements to all instances or we must create separate ones for each one. They are separated between instances at that moment because of the class load approach, but as far as i see no context information is kept in those elements. So we can share them between ApacheDS instances. What do you think? > I not sure these can be shared between ApacheDS instances. Two instances can have very different schemas (with schema elements having different 'enabled' states from one instance to the other for example). True. -- Regards, Cordialement, Emmanuel Lécharny www.iktek.com