Hi,

Just solved the same issue without having a dependency on the Karaf
installation path:

You have to include the ehcache.xml file in your bundle jar file. E.g. you
may have it as

<http://camel.465427.n5.nabble.com/file/n5791855/ehcache.png> 

and point to it:

        <bean id="cache" 
class="org.apache.camel.component.cache.CacheComponent">
 *      <property name="configurationFile"
value="classpath:com/edmi/certificates/management/meters/routes/ehcache.xml"
/>*
        </bean>

In any case to include it in a different way you can configure your maven
bundle plugin to do so.

------------Details---------------

blueprint.xml:

        <bean id="ehCacheManagementService"
class="net.sf.ehcache.management.ManagementService"
                init-method="init" activation="eager">
                <argument>
                        <bean class="net.sf.ehcache.CacheManager" 
factory-method="getInstance" />
                </argument>
                <argument>
                        <bean class="org.springframework.jmx.support.JmxUtils"
                                factory-method="locateMBeanServer" />
                </argument>
                <argument value="true" />
                <argument value="true" />
                <argument value="true" />
                <argument value="true" />
        </bean>
        
        <bean id="cache" 
class="org.apache.camel.component.cache.CacheComponent">
        <property name="configurationFile"
value="classpath:com/edmi/certificates/management/meters/routes/ehcache.xml"
/>
        </bean>

ehcache.xml:

<?xml version="1.0" encoding="UTF-8"?>
<ehcache>

<defaultCache maxElementsInMemory="1000" eternal="false"
timeToIdleSeconds="120" timeToLiveSeconds="200" />    

<cache
    name="initAndGetLineCounterForKey"
    timeToIdleSeconds="0"
    timeToLiveSeconds="0"
    overflowToDisk="false"
    diskPersistent="false"
    memoryStoreEvictionPolicy="LFU" 
    transactionalMode="off"
    maxElementsInMemory="10000"
/>
</ehcache>



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

Reply via email to