Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Resolved
-
2.17.0
-
None
-
Patch Available
-
Unknown
Description
Currently the ValidatorProcessor caches an object representation of the schema and there is no possibility to invalidate the cache. This improvement introduces the method clearCachedSchema on the Validator Endpoint with which the cached schema is cleared so that on the next call the schema is reread. The method is annotated with @ManagedOperation so that it can be called from the JMX console.
The method can be used to update the schema in the endpoint when the underlying schema file has changed. For example, you can implement a custom class resolver which reads the schema file from a data base; whenever the schema file is changed in the data base, then you can update the cached schema with the above method without restarting the camel route.
A similar method exists for the XSLT component. See method XsltEndpoint.clearCachedStylesheet.