Table of Contents Previous Next
Logo
Ice Properties and Configuration : 26.5 The Ice.Config Property
Copyright © 2003-2008 ZeroC, Inc.

26.5 The Ice.Config Property

The Ice.Config property has special meaning to the Ice run time: it determines the pathname of a configuration file from which to read property settings. For example:
$ ./server Ice.Config=/usr/local/filesystem/config
This causes property settings to be read from the configuration file in /usr/local/filesystem/config.
The Ice.Config command-line option overrides any setting of the ICE_CONFIG environment variable, that is, if the ICE_CONFIG environment variable is set and you also use the Ice.Config command-line option, the configuration file specified by the ICE_CONFIG environment variable is ignored.
If you use the Ice.Config command-line option together with settings for other properties, the settings on the command line override the settings in the configuration file. For example:
$ ./server Ice.Config=/usr/local/filesystem/config \
Ice.MessageSizeMax=4096
This sets the value of the Ice.MessageSizeMax property to 4096 regardless of any setting of this property in /usr/local/filesystem/config. The placement of the Ice.Config option on the command line has no influence on this precedence. For example, the following command is equivalent to the preceding one:
$ ./server Ice.MessageSizeMax=4096 \
Ice.Config=/usr/local/filesystem/config
Settings of the Ice.Config property inside a configuration file are ignored, that is, you can set Ice.Config only on the command line.
If you use the Ice.Config option more than once, only the last setting of the option is used and the preceding ones are ignored. For example:
$ ./server Ice.Config=file1 Ice.Config=file2
This is equivalent to using:
$ ./server Ice.Config=file2
You can use multiple configuration files by specifying a list of configuration file names, separated by commas. For example:
$ ./server Ice.Config=/usr/local/filesystem/config,./config
This causes property settings to be retrieved from /usr/local/filesystem/config, followed by any settings in the file config in the current directory; settings in ./config override settings /usr/local/filesystem/config. For C++, Python, Ruby, and .NET, this mechanism also works for configuration files specified via the ICE_CONFIG environment variable.
Table of Contents Previous Next
Logo