You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2010/11/06 15:49:00 UTC

[jira] Commented: (CAMEL-2737) xslt component - Add option for templateCache to control if template is cached or loaded on each invocation

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

Claus Ibsen commented on CAMEL-2737:
------------------------------------

Richard

Just a minor flaw in the patch.
Endpoint options should not set/override the existing option on the component.

What we should do is to
- use option from endpoint if any given
- if not fallback and use component option

So you should do something like this instead
{code}
        // default to use the cache option from the component if the endpoint did not have the loaderCache parameter
        boolean cache = getAndRemoveParameter(parameters, "loaderCache", Boolean.class, loaderCache);
{code}

Notice that cache is a local variable.

> xslt component - Add option for templateCache to control if template is cached or loaded on each invocation
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2737
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2737
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-spring
>    Affects Versions: 2.3.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.6.0
>
>         Attachments: XsltComponent.java.patch, XsltLoaderCacheTest.java.patch
>
>
> Then you can have it hot-reload template files.
> For example as the Velocity component can do

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.