You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Olabusayo Kilo (Jira)" <ji...@apache.org> on 2025/07/24 14:18:00 UTC

[jira] [Assigned] (DAFFODIL-3009) SchematonValidator is not threadsafe

     [ https://issues.apache.org/jira/browse/DAFFODIL-3009?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olabusayo Kilo reassigned DAFFODIL-3009:
----------------------------------------

    Assignee: Olabusayo Kilo

> 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
>
> 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)