How do I configure JCS? By default JCS looks for a cache.ccf file in the classpath. You must have a configuration file on the classpath to use JCS. The documentation describes how to configure the cache.
So the config files does not need to be in the jar file, just in the classpath. Don't add the full path to the file, just the filename witch will be found in the classpath. CompositeCacheManager cacheMgr = CompositeCacheManager.getUnconfiguredInstance(); Properties props = new Properties(); props.load(new BufferedInputStream(new FileInputStream(cacheConfigFile))); cacheMgr.configure(props); On 27/02/2008, Graham Leggett <[EMAIL PROTECTED]> wrote: > Hi all, > > I have been trying to find a way to convince JCS v1.3 to initialise the > JCS object using user provided properties. The default way forces you to > embed your config files inside your jars, and we want to be able to > configure our software without bing forced to recompile it to do so. > > So far we have found this entry in the FAQ: > > http://jakarta.apache.org/jcs/faq.html#manual-configuration > > The trouble is this faq entry only answers half the question. It shows > you how to create a CompositeCacheManager object, but there is no clear > way from there to arrive at a JCS object. > > Does anyone have a quick piece of code to explain how this might be done? > > Regards, > Graham > > -- > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]