Client Configuration
You configure the client in two files: geode.properties
for system-level configuration and cache.xml
for cache-level configuration.
The configuration of the caches is part of the application development process. See Cache Initialization File (cache.xml). (The cache-level configuration file is generally referred to as cache.xml
, but you can use any name.)
About the geode.properties Configuration File
The geode.properties
file provides local settings required to connect a client to a distributed system, along with settings for licensing, logging, and statistics. See Attributes in the Properties File.
The application software may include a set of geode.properties
files. You set any attributes needed for the application design in these files, then you can add any attributes needed for the local site.
If you do not have geode.properties
files, use any text editor to create them. See Properties File Example for a sample of the file format and contents.
Configuration File Locations
A client looks for a geode.properties
file first in the working directory where the process runs, then in product-dir/defaultSystem
.
Use the defaultSystem
directory to group configuration files or to share them among processes for more convenient administration. If geode.properties
is not found, the process starts up with the default settings.
For the cache.xml
cache configuration file, a client looks for the path specified by the cache-xml-file
attribute in geode.properties
(see Attributes in the Properties File). If the cache.xml
is not found, the process starts with an unconfigured cache.
Configuring System Properties for the Client
The typical configuration procedure for a client includes the high-level steps listed below. The rest of this chapter provides the details.
- Place the
geode.properties
file for the application in the working directory or inproduct-dir/defaultSystem
. Use the configuration file that came with the application software if there is one, or create your own. See Properties File Example for a sample of the file format and contents. - Place the
cache.xml
file for the application in the desired location and specify its path in thegeode.properties
file. - Add other attributes to the
geode.properties
file as needed for the local system architecture. See Attributes in the Properties File for the configurable attributes, and Properties File Example for a sample of the file format.
Running a Client Out of the Box
If you start a client without any configuration, it uses any attributes set programmatically plus any hard-coded defaults (listed in Attributes in the Properties File). Running with the defaults is a convenient way to learn the operation of the distributed system and to test which attributes need to be reconfigured for your environment.