com.cloudtran.api
Interface IConfigPropertiesReader

All Known Implementing Classes:
ConfigPropertiesReader

public interface IConfigPropertiesReader


Method Summary
 Properties getCustomProperties()
          Get the current list of CloudTran-specific config properties for this JVM.
 

Method Detail

getCustomProperties

Properties getCustomProperties()
Get the current list of CloudTran-specific config properties for this JVM.

The default implementation of this interface, in com.cloudtran.util.impl.ConfigPropertiesReader, looks in the resource 'config.properties' in all possible locations on the ClassPath, with the earlier value specified for a given property (i.e. occurring in a resource earlier in the classpath) overriding any properties found later in the classpath.

You can override the default implementation by specifying the (start-of-day) system property "config.propertiesReaderClass".

The properties you specify via the ConfigPropertiesReader (or config.properties) are added to the initial System properties, which is read at start of day - when the first CloudTran API is called. This means that properties specified through this mechanism can be used to set e.g. Coherence properties.

You can reset the config properties by calling {link Utils.resetConfigProperties()}. This will throw away any System properties set since start of day, or the most recent previous resetConfigProperties() call.

However, note that static initialization, such as Coherence cache configuration properties, are fixed at first initialization. Most CloudTran properties can be overridden after re-initialization via resetConfigProperties().