We finally extracted the JCS conf file (cache.ccf) from the classpath of the web app.
I added a JVM property for this file. Before accessing to the JCS regions, I load the properties then use the CompositeCacheManager class to configure JCS.
String jcsConfFile = System.getProperty("XXXXXX");
if (jcsConfFile == null || jcsConfFile.trim().length() == 0) {
log.error("error:JCSManager .........");
} else {
Properties props = new Properties();
try {
// load a properties file
props.load(new FileInputStream(jcsConfFile));
} catch (IOException e) {
log.error("error:JCSManager ........", e);
}
CompositeCacheManager ccm = CompositeCacheManager.getUnconfiguredInstance();
ccm.configure(props);
}
//....
// later, ask for the region
JCS cache = JCS.getInstance(region);