Hi, satya wrote:
> Hi > > http://xstream.codehaus.org/faq.html - says XStream is thread safe - > "Once the XStream instance has been created and configured, it may be > shared across multiple threads " > > XStream xstream = new XStream(); > Person person = (Person)xstream.fromXML(xml); > > So above piece of code should work fine in multi-threaded environment : The above piece of code does not even try to share an XStream instance between threads. > Coming to the Point - > I use Spring OXM ,where i can configure Marshaller/Unmarshaller in any of > the following ways : > > <bean id="jaxbMarshaller" > class="org.springframework.oxm.jaxb.Jaxb2Marshaller"> > <property name="classesToBeBound"> .... > OR > <bean id="xstreamMarshaller" > class="*org.springframework.oxm.xstream.XStreamMarshaller*"> > <property name="aliases"> ...... > > import *org.springframework.oxm.Marshaller*; > import *org.springframework.oxm.Unmarshaller*; > public class Application { > private *Marshaller *marshaller; > private *Unmarshaller *unmarshaller; > > IS XStream also Thread Safe while configured through Spring-OXM(as above) > ? > > If so , then can we say org.springframework.oxm.*Marshaller *& > org.springframework.oxm.*Unmarshaller *also Thread Safe ? OR it depends on > the kind of marshaller (jaxbMarshaller/xstreamMarshaller) configured > through Spring OXM . > > Clarification will be helpful . Sorry, I have no idea. You have to ask the Spring people if and how they share the same XStream instance and when they configure it. - Jörg --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
