Error Reading /oscache.properties
Mailing List Use Advanced Search to search the entire archive. [Opensymphony-oscache] EntryUpdateState locking problem - two non-existent gets in a row » Back to List Archive Chronological | Threaded « Previous Message Next » « Previous Thread Next » From: "Richard Taylor"
Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.
/ oscache / 2.3 2.4.1 2.4 2.3 / com.opensymphony.oscache.base.Config Find Usages Diff http://grepcode.com/file/repo1.maven.org/maven2/opensymphony/oscache/2.3/com/opensymphony/oscache/base/Config.java Raw Download HTML Widget oh http://oscache.sourcearchive.com/documentation/2.4.1plus-pdak1/Config_8java-source.html o [] Start line: End line: Snippet Preview Snippet HTML Code Stack Overflow Questions 1/*2*Copyright(c)2002-2003byOpenSymphony3*Allrightsreserved.4*/5packagecom.opensymphony.oscache.base;67importorg.apache.commons.logging.Log;8importorg.apache.commons.logging.LogFactory;910importjava.io.InputStream;1112importjava.util.Properties; Responsible for holding the Cache configuration properties. error reading If the default constructor is used, this class will load the properties from the cache.configuration. Author(s):Fabian Crabus Version:$Revision: 1.1 $2122publicclassConfigimplementsjava.io.Serializable{23privatestaticfinaltransientLoglog=LogFactory.getLog(Config.class); Name of the properties file. 2728privatefinalstaticStringPROPERTIES_FILENAME="/oscache.properties"; Properties map to hold the cache configuration. 3233privatePropertiesproperties=null; Create an error reading /oscache.properties OSCache Config that loads properties from oscache.properties. The file must be present in the root of OSCache's classpath. If the file cannot be loaded, an error will be logged and the configuration will remain empty. 4041publicConfig(){42this(null);43} Create an OSCache configuration with the specified properties. Note that it is the responsibility of the caller to provide valid properties as no error checking is done to ensure that required keys are present. If you're unsure of what keys should be present, have a look at a sample oscache.properties file. Parameters:p The properties to use for this configuration. If null, then the default properties are loaded from the oscac
* Copyright (c) 2002-2007 by OpenSymphony * All rights reserved. */ package com.opensymphony.oscache.base; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import java.io.IOException; import java.io.InputStream; import java.net.URL; import java.util.Properties; /** * Responsible for holding the Cache configuration properties. If the default * constructor is used, this class will load the properties from the * cache.configuration
. * * @author Fabian Crabus * @version $Revision: 412 $ */ 00024 public class Config implements java.io.Serializable { private static final transient Log log = LogFactory.getLog(Config.class); /** * Name of the properties file. */ 00031 private final static String PROPERTIES_FILENAME = "/oscache.properties"; /** * Properties map to hold the cache configuration. */ 00036 private Properties properties = null; /** * Create an OSCache Config that loads properties from oscache.properties. * The file must be present in the root of OSCache's classpath. If the file * cannot be loaded, an error will be logged and the configuration will * remain empty. */ 00044 public Config() { this(null); } /** * Create an OSCache configuration with the specified properties. * Note that it is the responsibility of the caller to provide valid * properties as no error checking is done to ensure that required * keys are present. If you're unsure of what keys should be present, * have a look at a sample oscache.properties file. * * @param p The properties to use for this configuration. If null, * then the default properties are loaded from the oscache.properties
* file. */ 00059 public Config(Properties p) { if (log.isDebugEnabled()) { log.debug("OSCache: Config called"); } if (p == null) { this.properties = loadProperties(PROPERTIES_FILENAME, "the default configuration"); } else { this.properties = p; } } /** * Retrieve the value of the named configuration property. If the property * cannot be found this method will return null<