Olabusayo Kilo created DAFFODIL-3009:
----------------------------------------

             Summary: SchematonValidator  is not threadsafe
                 Key: DAFFODIL-3009
                 URL: https://issues.apache.org/jira/browse/DAFFODIL-3009
             Project: Daffodil
          Issue Type: Bug
          Components: Back End
    Affects Versions: 3.11.0
            Reporter: Olabusayo Kilo


I _think_ SchematronValidator is not thread safe. makeValidator is required to 
return something that is thread safe.

This creates a Schematron object which creates a Transformer. And the javadoc 
says transformer is not thread safe.

So I think the transformer needs to be wrapped in a ThreadLocal or something.

it does wrap the XMLReader in a ThreadLocal, but it only gets an instance from 
that ThreadLocal when it initially creates the Schematron object, which is 
shared among threads. So I don't think the use of the XMLReader works probably.

 

Context: https://github.com/apache/daffodil/pull/1479#discussion_r2183499387



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to