Hi Ming, Huang, Ming wrote:
> Hi > > We recently updated xstream from from version 1.3.1 to 1.4.7 in our > application. We found that the application would sometimes hang. Doing > jstack and found that the threads were in the lines of at > com.thoughtworks.xstream.core.util.PrioritizedList.iterator(PrioritizedList.java:44). > Attached is the full stack. Can someone help me on this? Do I need to put > synchronized around XStream.toXML() call? Normally no, XStream is thread-safe for concurrent marshalling/unmarshalling. Unless you process annotations on-the-fly, XStream documentation contains a lot of warnings about it: http://xstream.codehaus.org/faq.html#Scalability_Thread_safety http://xstream.codehaus.org/annotations-tutorial.html#AutoDetect http://xstream.codehaus.org/javadoc/com/thoughtworks/xstream/XStream.html http://xstream.codehaus.org/javadoc/com/thoughtworks/xstream/XStream.html#autodetectAnnotations(boolean) So, how do you setup your XStream instance? Which Java VM you are using? Cheers, Jörg --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
