Hi,
I was expecting that the last step (ie completing the SchemaService) to
be easy. Sadly, it was not that simple. In order to be able to update
the comparatorRegistry (or any registry in fact), I had to modify all
the places in the server where this registry is used directly.
For COmparatorRegistry, this is easy. For the AttributeTypeRegistry, as
it is used all over the server, this was simply impossible.
To be clear, the main problem I had to face was that if I enable a
schema, it will modify the registries, and the associated SchemaObject
registries. Sadly, as we have many places in the server where we store
local references to those registries, they weren't updated.
The solution is simple, but a bit painful : everywhere in the code where
we references those inner registries, we have to access them through the
SchemaManager.
This is what I'm currently doing.
Also, in order to guarantee that no one can update those registries
while we are using them, each time we have to get a reference to thsoe
inner registries, we are using a Immutable instance insteance of the
real registries (it's simply a copy which disable all the modification
methods.
I think I'm almost done with all those modifciations, I still have 40
errors to fix, down from more than one thousand (the svn diff is around
24 000 lines).
Get ready for a huge commit by the next few days !
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org