Objectivity/DB Administration : Administration Tasks : Objectivity Configuration Files
5 
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 tool or 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:
name="value" 
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">
    <LocationPreferenceRank>       
      <StorageLocation value="myHost::C:\myData"/>
    </LocationPreferenceRank>
  </LocationPreferences>
 
  <!-- 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:
installDir/config/machine.config
machine.config is delivered with initial settings that are used by all processes (tools and applications such as 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. Any setting not explicitly mentioned in the configuration file uses a built-in default value.
     
When Configuration Settings are Loaded
A process 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 process.
Accordingly, if you change any settings in a configuration file, those changes will not take effect until the next time a process loads the settings from that file (the next time you run an application).