On Wed, Sep 9, 2009 at 2:05 AM, Emmanuel Lecharny <firstname.lastname@example.org> wrote:
I was working on the DirectoryService startup process yesturday. This is called by the DirectoryServiceFactory, and when you launch the integration tests, you get a NPE.
The reason we get it is because at some point, we don't have a working directory to look at for the schema.
In order to fix this, we just have to inject the SchemaPartition working directory, and we will be set. The question is now to determinate how we will inject this property.
The schema partition is initialized only once : if its working directory is empty. In this case, we extract all the existing schema files from a jar, into a directory. Otherwise, we just read this directory, and load the registries. The problem is that we must have a pointer to this working directory, and we don't have any atm.
1) how do we set the working directory ?
2) when do we set it, assuming that it may be a part of the configuration ?
3) shouldn't it be a static definition ?
Right now, all the partitions are stored into the DirectoryService working directory (default to 'server-work'), under a subdirectory using the partition Id (ie, "schema" here for the schema partition). That sounds good to me atm.