[jdom-interest] Thread questions regarding JDOM SAXBuiler?

David Wall d.wall at computer.org
Sun Aug 29 15:32:59 PDT 2004

If I expect to do a lot of parsing with JDOM, it seems that I might want to
create a pool of SAXBuilder objects to avoid the overhead of loading the
parser.  Is that true, or is the overhead of creating one quite small?

Is a SAXBuilder thread-safe, or should I only be calling the
SAXBuilder.build() method in a single thread at a time for a given

And I presume it's okay to reuse a SAXBuilder object by having many
different threads build() documents over time without any issues that one
XML parsing would affect the other (assuming they have the same options,
like ignore whitespace, validation, etc.).

Is that the case?  If I do a lot of parsing (at least once per HTTP
request), should I use a pool of SAXBuilder objects for this purpose, or is
the overhead small enough that I can just create a new SAXBuilder whenever I
want one?


More information about the jdom-interest mailing list