jakarta-jcs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Müller <minf...@mysign.ch>
Subject Properties instead of config file
Date Wed, 01 Sep 2004 16:37:17 GMT
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: turbine-jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-jcs-dev-help@jakarta.apache.org


Mime
View raw message