Defines interfaces and constants for general purpose configuration components.

Package Specification

All real life applications require a set of configuration parameters usually supplied in Java property files. This works fine until a need arises to load the configuration from a database, an XML file, JNDI tree or any other kind of back end storage. The property file access logic is often buried in the business components themselves. As a result, very expensive and painful coding changes are required to hardwire the application to the new configuration repository back end.

This package provides a generic solution to this problem by defining a contract for all general purpose configuration services. Service implementations hide the back end access logic behind the simple to use interface and decouple it from the business code. The client code that uses the contract defined by IConfig interface is oblivious to the fact that any specific type of back end storage is used. Furthermore, different storage can be used at any given moment by switching the implementation at runtime allowing features like hot deployment and service chaining. The possibilities are endless due to a simple fact that application code that serves as a client to the configuration service is not hardwired to any specific implementation.

Use example

Following code snippet get a configuration string value. NOTE: Static Repository class is a generic factory introduced in the KpInf reference implementation.
IConfig oConfig = (IConfig) Repository.get(IConfig.class, "myConfigName");

String  strMyValue = oConfig.getString("myStringParameterName");
@since 12/15/2004