[
https://issues.apache.org/jira/browse/CAMEL-5940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13612148#comment-13612148
]
Henryk Konsek commented on CAMEL-5940:
--------------------------------------
Yeah, it will be nice to have properties configuration support as well. Thanks
for creating the
However the key point in my previous comment regarded the way you plan to scan
the classpath. We don't want to scan classpath with Spring Resources utility.
As far as I know the preferred way to scan the classpath in Camel is via
{{ClassResolver}} and {{ResourceHelper}} classes.
{code}
ClassResolver classResolver = context.getClassResolver();
InputStream xmlConfig =
ResourceHelper.resolveMandatoryResourceAsInputStream(classResolver,
"classpath:/com/my/app/ehcache/config.xml");
{code}
So actually your {{loadResourceAsStream}} method is unnecessary, as Camel can
handle this dirty work for you :) .
> camel-cache - Add option to cache component to easily configure ehcache XML
> file to load by default
> ---------------------------------------------------------------------------------------------------
>
> Key: CAMEL-5940
> URL: https://issues.apache.org/jira/browse/CAMEL-5940
> Project: Camel
> Issue Type: Improvement
> Components: camel-cache
> Reporter: Claus Ibsen
> Fix For: 2.11.1
>
>
> See
> By default ehache.xml is loaded from classpath. We should make it possible to
> configure CacheComponent with a string option that refers to the resource to
> load.
> Then people can do something a like:
> {code}
> <bean id="cache" class="...CacheComponent">
> <property name="configurationFile" value="classpath:com/foo/mycache.xml"/>
> </bean>
> {code}
--
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