This section provides a procedure and an example for deploying configuration files in
- Jar the files.
- Set the Pivotal GemFire system
properties to point to the files as they reside in the jar file.
- Include the jar file in your
- Verify the jar file copies are the only
ones visible to the application at runtime. GemFire searches the
CLASSPATH after searching other locations, so the files
cannot be available in the other search areas.
- Start your application. The
configuration file is loaded from the jar file.
Example of Deploying a Configuration JAR
The following example deploys the cache configuration file, myCache.xml
. The following displays the contents of
% jar -tf my.jar
In this example, you would perform the following steps to deploy the configuration jar
- Set the system property,
- Set your CLASSPATH to
- Verify there is no file named
myCache.xml in ./myConfig/myCache.xml, the
current directory location of the file
When you start your application, the configuration file is loaded from the jar file.