jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Smuts <asm...@yahoo.com>
Subject Re: Config file placement
Date Wed, 14 Dec 2005 01:47:28 GMT
I can add the ability to find the location from the
system properties, sure.  For the time being, you can
load it yourself and use the CompositeCacheManager to
initialize JCS with a Properties object.

--- Alistair Forbes <alistair.forbes@2e-systems.com>
wrote:

> Is it possible to specify the path to the config
> file?
> 
> Something like: -Djcs.configfile=../config/cache.ccf
> 
> This would be preferrable to using the classpath.
> 
> A null-check on the current setup would probably
> also help some folks.
> 
> diff -u -r1.14 CompositeCacheManager.java
> ---
>
src/java/org/apache/jcs/engine/control/CompositeCacheManager.java
>   
> 4 Jun 2005 02:01:58 -0000    1.14
> +++
>
src/java/org/apache/jcs/engine/control/CompositeCacheManager.java
>   
> 13 Dec 2005 22:13:48 -0000
> @@ -162,6 +162,12 @@
>          Properties props = new Properties();
> 
>          InputStream is =
> getClass().getResourceAsStream( propFile );
> +        if (is == null)
> +        {
> +            logger.error("Failed to load " +
> propFile
> +                         + "Try /" + propFile + "
> if in the root 
> classpath.");
> +        }
> +
> 
> Regards
> Al
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> jcs-users-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> jcs-users-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-users-help@jakarta.apache.org


Mime
View raw message