Results 1 to 3 of 3

Thread: is Jaxb2Marshaller thread safe?

  1. #1
    Join Date
    May 2008
    Posts
    153

    Default is Jaxb2Marshaller thread safe?

    The javadoc makes no mention if Jaxb2Marshaller is thread safe. In particular are marshall() / unmarshall() thread safe?
    While objects returned from createMarshaller() / createUnmarshaller() are clearly said not to be threadsafe, nothing is said about Jaxb2Marshaller itself.

  2. #2

    Default

    Jaxb2Marshaller methods createMarshaller() and createUnmarshaller() look thread-safe IMHO, the comment on not being thread safe refers to the objects these methods return. If you look at the code, createMarshaller() is called for each marshal() call to avoid thread safety issues for example.

  3. #3
    Join Date
    May 2008
    Posts
    153

    Default

    Thanks, good to know.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •