I have a services project and a web project. I need to have eh-cache in both projects.
The idea is that if the service project is updated, it\'s cache-related change
The configurationResourceName property is used to specify the location of the ehcache configuration file.The resource is searched for in the root of the classpath. It is used to support multiple CacheManagers in the same VM.
net.sf.ehcache.configurationResourceName=/name_of_ehcache.xml
Try naming both cacheManagers differently in ehcache.xml
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="ehCacheManager1">
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="ehCacheManager2">
if you use different cache for different WAR and you want to prevent collisions, go to echcache.xml of each WAR and define different multicastGroupPort values under cacheManagerPeerProviderFactory element. also disable distribution.
Good luck!