Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-9517

Validator Component: add clearCachedSchema method to ValidatorEndpoint

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Resolved
    • 2.17.0
    • 2.17.0
    • camel-core
    • 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.

      Attachments

        Activity

          People

            forsthofer Franz Forsthofer
            forsthofer Franz Forsthofer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: