Keep a reference on the DocumentBuilder factory instead of DocumentBuilder in order to avoid concurrency issues.
Usage of a Factory for the *DocumentBuilder

Keep a reference to a factory of *DocumentBuilder instead of the DocumentBuilder
itself, in order to avoid concurrency issues.