style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-7505528228218001"
data-ad-slot="1225241371">

1.2.1 - Using JConfig class

JConfig is the main configuration class, that reads in properties and uses search paths to find resources. It also configures the logging system from user and builtin logger properties.

When JConfig is first initialized by the JRE, it uses a special sequence of steps to initialize the SDK and envionment. The initialization steps are as follows:

  1. Create a basic, barely initialized logger so that error messages at this very importat startup sequence can be reported.
  2. Export some global builtin variables into a variable table
  3. Load builtin, user and system properties and combine them using a special CompositeProperties class. The CompositeProperities class, allows 3 different Properties objects to be queried and accessed for each getProperty request. This class provides properties inherinance.
  4. Export more variables that may have been defined in configuartion properties. Any property that begins with a prefix of "var." is automatically exported as a variable.
  5. Now look for builtin and user supplied logger.properties files. Combine the using CompositeProperties class and reinitialize LogManager. LogManager will reread the combined properties.
  6. Setup PropertyChangeSupport for dispatching property changes to listeners.

After initialization the logger and SDK configuration properties are loaded. JConfig is not ready for property change listeners to register themselves with JConfig for any property changes. During registration, each listener is immediately notified of the config values, overriding any default internal values they may have had.

At this point JConfig is up and running.