Objectivity/DB Administration : Administration Tasks : Objectivity Configuration Files
Objectivity Configuration Files
This chapter shows you how to use Objectivity configuration files with Objectivity/DB applications.  
This chapter describes:
General information about Objectivity configuration files, including the file format.
Understanding Objectivity Configuration Files
An Objectivity configuration file is a text file that provides values, or settings, that are loaded into an Objectivity/DB application such as a Spark driver job. The settings in an Objectivity configuration file enable you to configure various preferences, policies, and internal resources.
For example, the settings described in Specifying Application-Specific Location Preferences configure how an application distributes new data files among a federated database’s registered storage locations.
Format of a Configuration File
An Objectivity configuration file:
Has the filename extension .config
Is an XML document that represents Objectivity configuration settings as a hierarchy of XML elements within a top-level <Objectivity> element.
You specify configuration settings by supplying values to attributes of particular XML elements, where each attribute is of the form:
Example The XML elements in this Objectivity configuration file represent configuration settings for location preferences. The element LocationPreferences has an attribute named allowNonPreferredLocations, which is set to the value "true".
<?xml version="1.0" encoding="UTF-8"?>
<Objectivity>           <!-- top-level element -->
  <!-- optional elements for other configuration settings -->
  <LocationPreferences allowNonPreferredLocations="true">
      <StorageLocation value="myHost::C:\myData"/>
  <!-- optional elements for other configuration settings -->
</Objectivity>           <!-- closing tag of the top-level element -->
In general, a configuration file only needs to represent the settings for which you want to specify nondefault values. If a particular setting is not explicitly represented, a built-in default value is used.
As in standard XML, all element and attribute tags are case-sensitive.
Default File for Machine-Wide Settings
A default machine-wide configuration file is provided within the ThingSpan installation directory installDir:
machine.config is delivered with default settings that are used by all Spark driver jobs running on the host machine where the file resides. Any settings you add to machine.config automatically become available to the next job you start.
Note:If you also have a separate Objectivity/DB installation, you will have a machine.config file in the Objectivity/DB installation directory, as well. This file is used by Objectivity/DB applications that are not Spark driver jobs. As delivered, this file is empty, which instructs Objectivity/DB to use built-in default settings.
When Configuration Settings are Loaded
An application loads the settings from a configuration file shortly after it starts. Once the settings are loaded, they remain in effect for the lifetime of the processes.
Accordingly, if you change any settings in a configuration file, those changes will not take effect until the next time an application loads the settings from that file (the next time you run the application).