Answer the question
In order to leave comments, you need to log in
Spring CompositeCacheManager of two modules dep.jar and appl.war?
Hello. I have the following situation.
When there is more than one manager in org.springframework.cache.support.CompositeCacheManager, the cache stops working. There is no error, but just empty objects are returned on any request.
If I have only classManager in CompositeCacheManager, then both the application and the cache work, but only for the classManager.
There is dependencyEE.jar in which the cache is defined.
<cache:annotation-driven/>
<bean id="eManager" class="org.springframework.cache.ehcache.EhCacheCacheManager"
p:cache-manager-ref="eCache" />
<bean id="eCache"
class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"
p:config-location="classpath:/META-INF/eEhcache.xml"
p:cacheManagerName="${service.name}.En" p:acceptExisting="false" p:shared="true"/>
<cache:annotation-driven cache-manager="cacheManager"/>
<bean id="classManager" class="org.springframework.cache.ehcache.EhCacheCacheManager"
p:cache-manager-ref="classCache" />
<bean id="classCache"
class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"
p:config-location="classpath:ehcache.xml" p:cacheManagerName="${service.name}.Class"
p:acceptExisting="false" />
<bean id="cacheManager" class="org.springframework.cache.support.CompositeCacheManager">
<property name="cacheManagers">
<array>
<ref bean="classManager" />
<ref bean="eManager" />
</array>
</property>
<property name="fallbackToNoOpCache" value="true" />
</bean>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question