def load_properties(file)
      raise ConfigurationError.new("Properties file not found: #{File.expand_path(file)}") unless File.exists?(file)
      properties = {}
      begin
        YAML.load_file(file).each { |key, value| properties[key.to_sym] = value }
      rescue
        raise ConfigurationError.new("Could not read properties file #{file}: " + $!)
      end
      # Uncomment the following line to print detail properties.
      #logger.debug { "#{file} properties:\n#{properties.pp_s}" }
      # parse comma-delimited string values of array properties into arrays
      @array_properties.each do |key|
        value = properties[key]
        if String === value then
          properties[key] = value.split(/,\s*/)
        end
      end
      # if the key is a merge property key, then perform a deep merge.
      # otherwise, do a shallow merge of the property value into this property hash.
      deep, shallow = properties.split { |key, value| @merge_properties.include?(key) }
      merge!(deep, :deep)
      merge!(shallow)
    end
def load_properties(file)
      raise ConfigurationError.new("Properties file not found: #{File.expand_path(file)}") unless File.exists?(file)
      properties = {}
      begin
        YAML.load_file(file).each { |key, value| properties[key.to_sym] = value }
      rescue
        raise ConfigurationError.new("Could not read properties file #{file}: " + $!)
      end
      # Uncomment the following line to print detail properties.
      #logger.debug { "#{file} properties:\n#{properties.pp_s}" }
      # parse comma-delimited string values of array properties into arrays
      @array_properties.each do |key|
        value = properties[key]
        if String === value then
          properties[key] = value.split(/,\s*/)
        end
      end
      # if the key is a merge property key, then perform a deep merge.
      # otherwise, do a shallow merge of the property value into this property hash.
      deep, shallow = properties.split { |key, value| @merge_properties.include?(key) }
      merge!(deep, :deep)
      merge!(shallow)
    end
Loads the specified properties file, replacing any existing properties.

 If a key is included in this Properties merge_properties array, then the
 old value for that key will be merged with the new value for that key
 rather than replaced.

 This method reloads a property file that has already been loaded.

 Raises ConfigurationError if file doesn't exist or couldn't be parsed.