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 :


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 . Thanks


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

    http://xircles.codehaus.org/manage_email


Reply via email to