Hello Michael,

as far as I can see when looking at the source of XMLClassDescriptorResolver it isn't thread safe by design. While I think there should be no problem if all ClassDescriptor's are loaded before starting to un-/marshal, I'd suggest to go safe and use them in a thread safe way. E.g. one CDR per thread or by implementing a CDR pool.

Regards
Ralf

Michael Crozier schrieb:
Hello,

As outlined in the best practices document, I'm using ClassDescriptorResolver to load and cache mappings. I understand that Marshaller and Unmarshaller objects are not thread safe, but ClassDescriptorResolver has no mention of thread-safety. I am using this mechanism to load mappings from String objects and well as from Files.

Is it thread-safe to share a single ClassDescriptorResolver instance between many threads, in which new marshalling objects are created per-invocation?

Many thanks,

  Michael


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to