users@jaxb.java.net

Re: concurrent access

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Wed, 09 Apr 2003 09:53:23 -0400

> we are planning to access JABXContext, Marshaller and Unmarshaller
> objects concurrently in order to optimize global performance. I've been
> reading the specification but haven't found whether this objects are
> thread-safe or not. Does this mean they are? Or is it left to the
> specific implementation?

As far as the RI is concerned, JAXBContext is thread-safe but
Marshaller and Unmarshaller are not.

By design, Marshaller and Unmarshaller has no way of being thread-safe
for any provider. The design of JAXBContext does allow it to be
thread-safe, but I'm not 100% sure if the spec will require that.

That's the current situation. We have this threading issue on our
bugtrack, so I think either the next version of the spec or the next
version of the API release will address this issue.

regards,
--
Kohsuke KAWAGUCHI                  408-276-7063 (x17063)
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com