You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Niels Bertram (JIRA)" <ji...@apache.org> on 2013/07/13 19:57:50 UTC

[jira] [Commented] (CAMEL-6548) XQueryBuilder will override any saxon Configuration provided

    [ https://issues.apache.org/jira/browse/CAMEL-6548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13707797#comment-13707797 ] 

Niels Bertram commented on CAMEL-6548:
--------------------------------------

Sent a patch together with a unit test as pull request to apache:camel-2.11.x on GitHub. Otherwise the commit on my fork is https://github.com/bertramn/camel/commit/52f26be2d2bf43b8bb35b88cc3984bc2548ddab6.
                
> XQueryBuilder will override any saxon Configuration provided
> ------------------------------------------------------------
>
>                 Key: CAMEL-6548
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6548
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-saxon
>    Affects Versions: 2.11.2
>            Reporter: Niels Bertram
>            Priority: Minor
>
> Sometimes one wants to register a custom extension function {{net.sf.saxon.lib.ExtensionFunctionDefinition}} in the saxon xquery engine context.
> When providing {{XQueryBuilder.setConfiguration(Configuration configuration)}} with such configuration, the method will set the context and also set the initialise flag to false (line 378). This will cause {{XQueryBuilder.initialize(Exchange exchange)}} to run next time the builder is used.
> Unfortunately the initialize method on line 639 it will create a new saxon Configuration regardless of what was set in the {{XQueryBuilder.setConfiguration()}} and renders this function pretty much useless.
> The obvious solution to this problem is to check if the configuration is null before creating a new saxon configuration.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira