Since that subject came up. It would also be nice to pass a URL for configuration (like in log4j). We had that need in our project and created a small hack but would be great if that was part of the official version.

Eduardo

Mike M�ller wrote:

Hi

To set the config filename now on ehas to use
th emethod setConfigFilename on org.apache.jcs.JCS
It would be nice if there would be a second method on the JCS object which would allow it, to pass a
Properties object instead of a filename. The problem
which occurred in our web application is the following:
we need to parse the cache.ccf and set the paths for
the file-cache on the startup of the servlet container.
in this case we need to write the cache.ccf after setting
the paths to the file cache and pass then the filename
of it with setConfigFilename to JCS. under some circumstances
JCS now can't read the file (maybe it isn't written entirely?)
and JCS gets a NullPointerException:


java.lang.NullPointerException
        at java.util.StringTokenizer.<init>(StringTokenizer.java:146)
        at java.util.StringTokenizer.<init>(StringTokenizer.java:162)
        at 
org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegion(CompositeCacheConfigurator.java:272)
        at 
org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegion(CompositeCacheConfigurator.java:243)
        at 
org.apache.jcs.engine.control.CompositeCacheManager.getCache(CompositeCacheManager.java:356)
        at 
org.apache.jcs.engine.control.CompositeCacheManager.getCache(CompositeCacheManager.java:315)
        at 
org.apache.jcs.engine.control.CompositeCacheManager.getCache(CompositeCacheManager.java:308)
        at org.apache.jcs.JCS.getInstance(JCS.java:103)

So if there's a way to pass the Properties object without writing it down to disk this would be great.
Maybe we can implement this in JCS, but we're not yet committer to
the JCS project. What do the committers think about it?



best regards

Mike M�ller

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to