Hi,
I'm using ehcache but my ehcache.xml file also has terracotta configured into it - therefore when writing tests I run into problems as this slows down the process severely by constantly trying to connect to the terracotta server.
I was wondering is there any way I can create another ehcache.xml file (an exact replica however minus the terracotta config) to use for the sole purpose of running tests?
I know there will be classpath issues but is there any way of overcoming this?
I'm also using both maven and spring so is there maybe a possibility of injecting the classpath through spring or declaring it in the pom through maven?
There are many options - simplest I suppose you could keep 2 ehcache.xml (ehcache_withTC.xml or ehcache_noTC.xml) files and depending on your environment create a symlink called ehcache.xml to the right one. And have your code bootstrap via ehcache.xml - or use a java-system.property to determine which ehcache.xml to load...