directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Göktürk Gezer <gokturk.ge...@gmail.com>
Subject Re: Accessing SchemaPartition and SingleFileLdifPartition directly
Date Mon, 05 Dec 2011 15:14:28 GMT
Hi Pierre,

On Mon, Dec 5, 2011 at 11:11 AM, Pierre-Arnaud Marcelot <pa@marcelot.net>wrote:

> Hi guys,
>
> On 5 déc. 2011, at 10:00, Emmanuel Lecharny wrote:
>
> > 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).
>
> I personally use a SearchOperationContext with a null core session in the
> PartitionsDiffComputer class (which computes the differences between two
> partition) in the ApacheDS v2 Configuration Editor plugin where I read the
> configuration partition (extracted from the LDIF files).
> It works great. Without any issue.
>
> The SchemaManager is actually tied to the Partition itself (and not the
> OperationContext or Session). So it should not be an issue.
>

Yeah this is what i saw on the code. OperationContext es are not queried
for something CoreSession specific. So i believe most of the operations can
work without an issue with "null" CoreSession.


> As a matter of fact, I really believe that it should always be allowed to
> do any kind of operation with any session.
>

+1

>
> Regards,
> Pierre-Arnaud
>
>
> > 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
> >
>
>

Mime
View raw message