Thanks. Looks much better now. I've posted my new answer to SO. And indeed, the official documentation is not talking about a possible cache manager to pass.
I still have one question though. Is it normal that EhcacheConfiguration can be instantiated? It seems normal to want to propose an overloaded version of the component or endpoint. And it is currently impossible (without overloading EhcacheConfiguration but I'm not sure it is allowed). On 16 May 2017 at 05:28, Luca Burgazzoli <lburgazz...@gmail.com> wrote: > 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 > <henri.tremb...@gmail.com> 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 >