The XPathExpression is thread-safe when using Saxon, not thread-safe when using JAXP/DOM. Not sure if we need to synchronize the evaluation. Maybe use the specific Saxon implementation classes, as it's imported by ph-schematron, and don't use any lock on that part.
The SchematronResourceXSLTs are not thread-safe. We could implement one lock per document type. Still, it prevents validating multiple documents of the same type at the same time, that could become a performance issue.
Make CdaChEmedValidator thread-safe
XPathExpression
is thread-safe when using Saxon, not thread-safe when using JAXP/DOM. Not sure if we need to synchronize the evaluation. Maybe use the specific Saxon implementation classes, as it's imported by ph-schematron, and don't use any lock on that part.SchematronResourceXSLT
s are not thread-safe. We could implement one lock per document type. Still, it prevents validating multiple documents of the same type at the same time, that could become a performance issue.