Hi Emmanuel,

Thanks for snapping in the discussion! I will add some of your valuable information to the documentation.

Emmanuel Lecharny wrote:
I will try to add some clarification about those partitions, because it's not really something trivial.

First, let's assume we are talking about 1.5 here.

Yes we do.

A partition is nothing more than, to take an analogy, a mounting point on a Unix filesystem. It has a root name (a DN in our case, and the underlying storage can be whatever we want, byt from now on, a JDBM based storage (we can perfectly set a partition to use BDB JE, as Kiran implemented it, or Oracle, or MySql, as some of our users did).

The main difference is that a partition _must_ be associated with an entry. It's npt different from what you have on OpenLdap anyway.

So let's sum up. You need :
- a name ("dc=example,dc=com", for instance)
- an alias in the configuration file ("example", here)
- an underlying storage ( <jdbmPartition id="example"...)
- and an entry which has to be injected in the server :
dn: dc=example,dc=com
ObjectClass: top
ObjectClass: domain
dc: example

and that's pretty much it.

As far as I understand it, the alias in the configuration file is not necessaryeven a configuration file is not necessary (if you run ApacheDS in embedded mode).

The entry representing the name/suffix has not to be injected into the server, if the underlying partition implementation already has this entry.

Emmanuel, would you please take a look at my minimal partition implementation,

http://cwiki.apache.org/confluence/display/DIRxSBOX/Draft+-+How+to+write+a+simple+custom+partition+for+ApacheDS

which simply carries one entry

dn: ou=helloWorld
objectClass: top
objectClass: organizationalUnit
description: hello, world
description: a minimal partition
ou: helloWorld

It has not been injected, because it is the only one it has, and it is created during the init-method.

Any feedback would be helpful. Is this a valid partition (and yes, I have created something completely useless from a storage point of view -- it is just a starting point for all the guys trying to write their own partition).

I already have some questions. But I plan to stabilize my minimal example first in order to have something for the docs. In have a second example, which publishes the System.properties and their values as a tree in order to show more methods from the partition interface.

Greetings from Hamburg,
    Stefan


Reply via email to