You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Marco Westermann <Ma...@gmx.de> on 2011/06/22 17:48:38 UTC

camel-cache configuration

Hi,

how do I configure the camel-cache (ehcache) component, if I don't need 
a from(cache) in my route? I don't wan't to react on changes in the cache.

in docs http://camel.apache.org/cache.html the example does the 
configuration within the from-element.

If I try to add values to the cache directly I get an exception:

net.sf.ehcache.CacheException: Error configuring from null. Initial 
cause was null

I use camel 2.6 inside smx.

thanks for any help.

Re: camel-cache configuration

Posted by Marco Westermann <Ma...@gmx.de>.
Hi,

thank you for your answers.

But what did that mean for me and my problem. Is there a solution. Do I 
have to apply the patch attached to jira? or is there already a fixed 
version? I'm not that familiar with camel development. ;-)

Thank you Marco

Am 22.06.2011 17:48, schrieb Marco Westermann:
> Hi,
>
> how do I configure the camel-cache (ehcache) component, if I don't 
> need a from(cache) in my route? I don't wan't to react on changes in 
> the cache.
>
> in docs http://camel.apache.org/cache.html the example does the 
> configuration within the from-element.
>
> If I try to add values to the cache directly I get an exception:
>
> net.sf.ehcache.CacheException: Error configuring from null. Initial 
> cause was null
>
> I use camel 2.6 inside smx.
>
> thanks for any help.
>


Re: camel-cache configuration

Posted by tnk <ju...@gmail.com>.
this might be related with your problem.
http://fusesource.com/forums/thread.jspa?messageID=9547&#9547

ehcache-failsafe.xml is missing inside ehcache bundle. 

--
View this message in context: http://camel.465427.n5.nabble.com/camel-cache-configuration-tp4514476p4515096.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel-cache configuration

Posted by boday <be...@initekconsulting.com>.
actually, you already can specify cache configuration via the producer...like
this

from("direct:a")
    .setHeader(CacheConstants.CACHE_OPERATION,
constant(CacheConstants.CACHE_OPERATION_ADD))
     .setHeader(CacheConstants.CACHE_KEY, constant("Ralph_Waldo_Emerson"))
     .to("cache://TestCache1?maxElementsInMemory=2");


boday wrote:
> 
> otherwise, I'll investigate adding support for configuring cache
> properties in the cache producer as well...
> 


-----
Ben O'Day
IT Consultant -http://consulting-notes.com

--
View this message in context: http://camel.465427.n5.nabble.com/camel-cache-configuration-tp4514476p4515009.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel-cache configuration

Posted by boday <be...@initekconsulting.com>.
you should be able to configure your cache explicitly using an ehcache.xml
file (just create one in your /src/main/resources directory)

otherwise, I'll investigate adding support for configuring cache properties
in the cache producer as well...


Marco Westermann wrote:
> 
> Hi,
> 
> how do I configure the camel-cache (ehcache) component, if I don't need 
> a from(cache) in my route? I don't wan't to react on changes in the cache.
> 
> in docs http://camel.apache.org/cache.html the example does the 
> configuration within the from-element.
> 
> If I try to add values to the cache directly I get an exception:
> 
> net.sf.ehcache.CacheException: Error configuring from null. Initial 
> cause was null
> 
> I use camel 2.6 inside smx.
> 
> thanks for any help.
> 


-----
Ben O'Day
IT Consultant -http://consulting-notes.com

--
View this message in context: http://camel.465427.n5.nabble.com/camel-cache-configuration-tp4514476p4514838.html
Sent from the Camel - Users mailing list archive at Nabble.com.