Thread-safety question

Andy <[email protected]> Sat, 4 Dec 2010 15:08:22 -0600
Newsgroups gmane.text.xml.xmlbeans.user
Message-ID <[email protected]>
Hi, I have a method below that unmarshals an input stream and since I will have many concurrent invocations of this method, I was wondering if there would be any Thread-safety issues?  I'm not a threading expert but just wanted to make sure the XmlObject.Factory.parse() method wouldn't cause any issues.








    protected final Object unmarshalInputStream(InputStream inputStream) throws XmlMappingException, IOException {
        try {
            XmlObject object = XmlObject.Factory.parse(inputStream, getXmlOptions());
            validate(object);
            return object;
        }
        catch (XmlException ex) {
            throw convertXmlBeansException(ex, false);
        }
    }

Thanks-