Product Documentation : Ehcache Developer Guide : Class Loading : Loading of ehcache.xml Resources
Loading of ehcache.xml Resources
If the configuration is otherwise unspecified, Ehcache looks for a configuration in the following order:
*Thread.currentThread().getContextClassLoader().getResource("/ehcache.xml")
*ConfigurationFactory.class.getResource("/ehcache.xml")
*ConfigurationFactory.class.getResource("/ehcache-failsafe.xml")
Ehcache uses the first configuration found. Note the use of "/ehcache.xml", which requires that ehcache.xml be placed at the root of the classpath (i.e., not in any package).
Copyright © 2010-2015 Software AG, Darmstadt, Germany.

Product Logo |   Feedback