> Given we are close to releasing i have taken the conservative step of
> creating and storing factories in thread locals.
Why do you bother with caching them anyways?
If it's for performance reasons, I would suggest to implement the
simple solution (new factory on every request), then measure, and then
maybe do something about it. As far as I can see there is nothing
expensive at least in DocumentBuilderFactory.
Martin