[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Is it possible to create a 2nd ehcache.xml file and use it for tests alone?  XML
Forum Index -> Ehcache
Author Message
Maggsull

neo

Joined: 07/07/2010 07:22:27
Messages: 2
Offline

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?

Thanks in advance.
zeeiyer

consul

Joined: 05/24/2006 14:28:28
Messages: 493
Offline

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...



Sreeni Iyer, Terracotta.
Not a member yet - Click here to join the Terracotta Community
rajoshi

seraphim

Joined: 07/04/2011 04:36:10
Messages: 1491
Offline

Issue seems to be resolved.Please let us know if more information is required.

Rakesh Joshi
Senior Consultant
Terracotta.
 
Forum Index -> Ehcache
Go to:   
Powered by JForum 2.1.7 © JForum Team