users@jaxb.java.net

clarification on thread safety as stated in FAQ?

From: jon gold <dev_at_samizdatdigital.org>
Date: Thu, 17 Jun 2004 04:50:10 -0700

i was wondering if someone might be able to clarify some thread safety
issues for me. i've read the faq and searched this list's archive for
thread safety, but still have a question.

first, i really never use the JAXBContext itself, but always an
ObjectFactory, which, from the output of xjc, seems to be a convenience
wrapper around JAXBContext, and so i'm assuming that the two are
synonymous with respect to threading. perhaps this should stand as the
first point on which i'll need to be clarificationized:)

in any event, the FAQ would seem to suggest that i need to have only one
instance of a somepackage.ObjectFactory in my application. this isn't
the most onerous task, but one i'd like to avoid if possible. is it
really unsafe if i create multiple ObjectFactories at a given point in
the application.

also, the FAQ says that the JAXBContext (ObjectFactory?) is thread safe.
may i assume then that of.createBlah(), where 'Blah' may be some object
generated from the schema, or a m/u/v, may be accessed simultaneously by
different threads? note that i'm not talking about concurrent access to
the m/u/v they create, just to their createBlah() methods in general.

jon


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net