public static ConfigurationManager getInstance() {
    try {
      class_mon.enter();

      if (config == null) {

        // this is nasty but I can't see an easy way around it. Unfortunately while reading the
        // config
        // we hit other code (logging for example) that needs access to the config data. Things are
        // cunningly (?) arranged so that a recursive call here *won't* result in a further
        // (looping)
        // recursive call if we attempt to load the config again. Hence this disgusting code that
        // goes for a second load attempt

        if (config_temp == null) {

          config_temp = new ConfigurationManager();

          config_temp.load();

          config_temp.initialise();

          config = config_temp;

        } else {

          if (config_temp.propertiesMap == null) {

            config_temp.load();
          }

          return (config_temp);
        }
      }

      return config;

    } finally {
      class_mon.exit();
    }
  }