Cacheonix configuration is stored in an simple XML file. To look up the configuration file, Cacheonix uses the following sequence. Each step is executed only if the previous step has not defined the configuration:
- Use the configuration defined by the URL in the system property cacheonix.configuration. The property is passed to JVM by using command line parameter -Dcacheonix.configuration=<path to configuration>.
- Use cacheonix-config.xml from the classpath.
- Use cacheonix-config.xml from the local directory
- Use fall-back META-INF/cacheonix-config.xml in the cacheonix.jar.
To disable the fall-back configuration, use JVM's command line parameter -Dcacheonix.fallback.configuration=false.
We recommend disabling the fall-back configuration when using Cacheonix in a production environment. The fall-back configuration may hide the fact that the production configuration is missing. Disabling it helps Cacheonix to fail fast thus allowing to discover the fact that the production configuration is missing.