0

In EhCache 3.0 how can I load EhCache.xml from external location. I have to start two server with same jar file. I get issue while starting second instance as persistence directory location is locked by first process.

I have tried 3 approaches. 1) change location of ehcache.xml in application.yml 2) provide location as command line argument 3) make directory as variable inside ehcache.xml like the way we do in log4j files. ex

Is there any way of achieving this via Java code.

SauriBabu
  • 414
  • 6
  • 15

1 Answers1

2

Got solution. From command line use --spring.cache.jcache.config=file:yourPath. Initially I was not using file protocol hence it was failing. So absence of protocol before path name assumes it as classpath.

SauriBabu
  • 414
  • 6
  • 15