Title: Is the xerces implementation of SAX thread-safe?

Hi,

I'm using xerces 2.6.1and java 1.4.2-10 to read and validate xml-files with XMLSchema. Because the files can get quite big, I use SAX rather than DOM. The overall mechanism is :

1) observe a directory
2) if the directory is not empty, parse all stored xml-files in the directory and stop observation
3) continue observation

Because there are multiple directories, I use one thread per directory and one SAXParser-object per thread. It seems there is a concurrency-problem because if more than one thread is active simultaneously, the parsed data is mixed up. I thought it would be sufficient to use one parser per thread. Is xerces using static structures that are accessible through different objects? What is about using xerces in a server environment (J2EE-container,...) with shared accesses?

Any ideas?

Stephan


Reply via email to