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 80F8378AA for ; Mon, 5 Dec 2011 09:00:45 +0000 (UTC) Received: (qmail 82746 invoked by uid 500); 5 Dec 2011 09:00:44 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 82717 invoked by uid 500); 5 Dec 2011 09:00:42 -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 82710 invoked by uid 99); 5 Dec 2011 09:00:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Dec 2011 09:00:39 +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 (athena.apache.org: domain of elecharny@gmail.com designates 209.85.216.50 as permitted sender) Received: from [209.85.216.50] (HELO mail-qw0-f50.google.com) (209.85.216.50) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Dec 2011 09:00:32 +0000 Received: by qadz32 with SMTP id z32so424212qad.16 for ; Mon, 05 Dec 2011 01:00:11 -0800 (PST) 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=e/+XRvBmQIs68no800vzXTnqf0zJ9tMpN9MMn+d34GE=; b=FmfBrzCcSEVeNRlFFPuzXEoXiEPrCgXKOMgLrO3onf5xtnWb3i4ifl7RMMO+GzK1Sv Mfh/bGGIun8WRCLhIf7va+Hm3GVnZ/q1xhilF/7GqqtHTkxX/arTJ6jKm5/er85Rj4UU sqoTiiqDyL+GHju513VEogktf2Xq+GRg6UggI= Received: by 10.224.187.71 with SMTP id cv7mr7014637qab.59.1323075611578; Mon, 05 Dec 2011 01:00:11 -0800 (PST) Received: from emmanuel-lecharnys-MacBook-Pro.local ([90.84.144.192]) by mx.google.com with ESMTPS id ed2sm24357218qab.15.2011.12.05.01.00.09 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 05 Dec 2011 01:00:10 -0800 (PST) Message-ID: <4EDC8818.2000606@gmail.com> Date: Mon, 05 Dec 2011 10:00:08 +0100 From: Emmanuel Lecharny Reply-To: elecharny@apache.org User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Apache Directory Developers List Subject: Re: Accessing SchemaPartition and SingleFileLdifPartition directly References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 12/4/11 8:23 PM, Göktürk Gezer wrote: > BTW, > > If passing null as CoreSession is ok on AbstractBTreePartition(Schema and > Config Partitions.) operations, i might use some pointers about how to use > them best. > > Pointers on SearchEngine usage could save me lots of hours also. From the top of my head, you need a CoreSession because you need a reference on the SchemaManager which is hold by the Session (in fact, we use an OperationContext, which contains a Session). The Partition will manipulate indexes, and for that, we need the SchemaManager, as it is the only place we have information about AttributeType names and OIDs, as Index are referring AT names or OID. Now, you should not need the DirectoryService instance to query the SchemaPartition. I have to check what could happen if you pass a null value as the CoreSession for this partition... -- Regards, Cordialement, Emmanuel Lécharny www.iktek.com