[
https://issues.apache.org/jira/browse/DAFFODIL-3009?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Olabusayo Kilo resolved DAFFODIL-3009.
--------------------------------------
Fix Version/s: 4.0.0
Resolution: Fixed
Fixed in 6207979e0b3dbe1a5224a7045e5a6f1ec8d06d52
> 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
> Assignee: Olabusayo Kilo
> Priority: Major
> Fix For: 4.0.0
>
>
> 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)