camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CAMEL-3940) Add support for loading scripts from files in the Camel language component
Date Thu, 05 May 2011 07:11:03 GMT
Add support for loading scripts from files in the Camel language component
--------------------------------------------------------------------------

                 Key: CAMEL-3940
                 URL: https://issues.apache.org/jira/browse/CAMEL-3940
             Project: Camel
          Issue Type: Improvement
          Components: camel-core
    Affects Versions: 2.7.0
            Reporter: Claus Ibsen
            Priority: Minor


This component
http://camel.apache.org/language

Can execute scripts. But the script is currently either from the endpoint uri or as a header.
We should add an option to indicate the script should be loaded from a resource (file, classpath,
http). And also whether or not the script should be cached or not. Its similar to the resource
endpoint classes (velocity, freemarker etc.).

If we build this logic into the camel-core then we can migrate the other components to use
camel-core only. As they rely on Spring Resource abstraction. It would be nice to get rid
of that dependency so end users can use those without the spring framework.

Maybe something like
{code}
from("direct:start").to("language:groovy?script=classpath:com/foo/myScript.groovy&contentCache=false").to("mock:result");
{code}

Note I put in contentCache as the name for the cache option as thats the name freemarker,
velocity uses.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message