camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Franz Forsthofer (JIRA)" <>
Subject [jira] [Reopened] (CAMEL-9572) Validator Component: Support custom resource resolver which depends on dynamic resource URI of the endpoint
Date Tue, 16 Feb 2016 11:21:18 GMT


Franz Forsthofer reopened CAMEL-9572:

The current   clearCachedSchema method re-reads the schema document in binary format and then
sets the object model of the schema to null so that in the next process call the object model
is re-built from the read binary.

Suppose that the schema document was deleted and now the clearCachedSchema method is called
in order to refresh the cached object model. In this case the re-read method will throw a
"not found" exception and will not update the cache.

However, in this case one expects that the cache is invalidated and that during the next process
call an error occurs because the schema document was deleted. 

Therefore the clear cache method should only clear the object model and not re-read the document.
The document shall be re-read during the next process call. 

This would also be in consistency with the treatment in the XSLT component. 

> Validator Component: Support custom resource resolver which depends on dynamic resource
URI of the endpoint
> -----------------------------------------------------------------------------------------------------------
>                 Key: CAMEL-9572
>                 URL:
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Franz Forsthofer
>            Assignee: Franz Forsthofer
>             Fix For: 2.17.0
>         Attachments: 0001-Validator-support-custom-resource-resolver-factory.patch
> The validator endpoint allows already to specify custom resource resolvers, via the parameter
resourceResolver. However, there is a use case where this functionality is not sufficient.
If you have a dynamically created validator endpoint, like
>  <camel:recipientList>
>      <camel:simple>validator:${header.XSD_FILE}?resourceResolver=#resourceResolver</camel:simple>
>  </camel:recipientList>
> where the resource URI of the XSD document is also dynamic (in the example via the header
XSD_FILE) and if your resource resolver depends on the resource URI of the XSD document, then
the current implementation gives you no solution for this problem. You cannot hand-over the
dynamic resource URI to the custom resource resolver.
> Therefore we introduce the new parameter resourceResolverFactory where you can specify
a factory which implements the method 
> LSResourceResolver createResourceResolver(CamelContext camelContext, String rootResourceUri);
> This method is called when the endpoint is created and gives you access to the endpoint
resource URI (parameter rootResourceUri).
> Remark: resource resolvers need to have the root resource URI in the case of relative

This message was sent by Atlassian JIRA

View raw message