I think the answer is a simple "no."
None of the other XML tree APIs are thread safe either, so far as I know.
Thread safety is a tricky thing to do across a "tree" model, as
insert/remove of an element can affect as many as three nodes (in a DOM
or AXIOM impl). It is difficult to synchronize on anything reasonable
that makes this work, at least as far as I've thought through the problem.
Maybe your point is subtler, though? AXIOM, as you probably know, is
constructed on the fly from a StAX stream. Perhaps you mean that
multiple threads should be able to simultaneously read an
as-yet-not-fully-parsed AXIOM tree, and it should all work "correctly",
regardless of where the various threads try to traverse?
-Eric.
Wan Luo wrote:
This is related to a previous thread, but I seperated it incase other
people have the same question.
I would like to use Axiom to parse SOAP requests on the server side.
Is Axiom Thread safe? I could not find any clues in the documentation.
if not, how do I make it thread-safe? Parser Pool, parser per thread
(expensive)? Is there a modular component built in to Axis to handle
parsing soap requests in a multi-threaded environment?