Yes it is possible using the cacheManager uri option.
The docs on website may be out of sync, for the latest doc have a look
at: 
https://github.com/apache/camel/blob/master/components/camel-ehcache/src/main/docs/ehcache-component.adoc

I will add the missing info to the camel website doc.

Also answered on StackOverflow.

---
Luca Burgazzoli


On Mon, May 15, 2017 at 8:11 PM, Henri Tremblay
<[email protected]> wrote:
> Hi,
>
> Following a stack overflow question (
> http://stackoverflow.com/questions/43915633/how-to-access-apache-camel-eh-cache-outside-camel-context)
> I realized that it is impossible cleanly.
>
> Am I right?
>
> Let's rephrase the problem here:
>
> Camel is using camel-ehcache but the same cache manager can be used
> somewhere else. So I would like to do one of these:
> 1- Give my own cache manager to camel
> 2- Retrieve camel cache manager
>
> The problem is EhcacheConfiguration. All ways to create this class have the
> default scope. It feels like a bug to me. Because, being able to create it,
> I could call setCacheManager and be done with it.
>
> I also noticed that the EhcacheEndpoint can't pass the "managed" flag. It
> seems useful in the case of a shared CacheManager to set it to false.
>
> So, am I missing something?
>
> Thanks,
> Henri Tremblay
> Ehcache developer
> Java Champion

Reply via email to