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 2011/05/05 09:11:03 UTC
[jira] [Created] (CAMEL-3940) Add support for loading scripts from
files in the Camel language component
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