When Hazelcast starts up, it checks for the configuration as follows:
First, it looks for the
hazelcast.config system property. If it is set, its value is used as the path. This is useful if you want to be able to change your Hazelcast configuration: you can do this because it is not embedded within the application. You can set the
config option with the following command:
<path to the hazelcast.xml>.
The path can be a normal one or a classpath reference with the prefix
hazelcast.xmlfile in the working directory.
hazelcast.xmlexists on the classpath.
hazelcast-default.xmlthat comes with
When you download and unzip
>.zip you will see a
hazelcast.xml in the
/bin folder. This is the configuration XML file for Hazelcast. Part of this configuration XML is shown below.
For most users, default configuration should be fine. If not, you can tailor this XML file according to your needs by adding/removing/modifying properties (Declarative Configuration). Please refer to the System Properties section for details.
Besides declarative configuration, you can configure your cluster programmatically (Programmatic Configuration). Just instantiate a
Config object and add/remove/modify properties.
You can also use wildcards while configuring Hazelcast. Please refer to the Using Wildcard section for details.
Please refer to the Hazelcast Configuration chapter for more information.