It is recommended that any .NET application using XAP.NET, includes several parameters defined in its XML configuration file. By default, no configuration of the JVM Setting needs to be done. However in many scenarios, the default configuration needs to be changed, such as a different heap size. This can be done by editing the relevant section inside the app.config.
The configuration example above has five configuration sections:
JvmMemory – allows you to set the heap memory size.
JvmDll – defines the location of your JVM dll.
JvmClassPath – allows you to add additional paths to the default classpath.
JvmBootClassPath – allows you to add additional paths to the default boot classpath.
JvmCustomOptions – allows you to add any additional custom parameters that will be passed to the JVM.
JvmMemory
The JvmMemory section contains two parameters, InitialHeapSizeInMB and MaximumHeapSizeInMB, that can be used to alter the default heap size values.
JvmDll
The JvmDll section contains two values, Mode and Path. The Mode lets you decide which JVM dll to load: (Client/Server/Custom). By default the value is Client, which means that the client JVM dll is loaded. The Path parameter is used only combined with Custom Mode, in which case, the JVM dll file is loaded from the given path.
JvmClassPath
The JvmClassPath section contains a list of additional paths that are appended to the classpath.
JvmBootClassPath
The JvmBootClassPath section contains a list of additional paths that are appended to the boot classpath.
JvmCustomOptions
The JvmCustomOptions section contains a list of any additional custom options that are passed to the JVM when created.
When defining a custom property that conflicts with an already existing built-in value, such as the class path or heap size, the value defined with the custom option overrides the existing value.
This section also contains a parameter named IgnoreUnrecognized. This determines whether to throw an exception, if an illegal custom option is passed inside the custom options list, or whether to ignore such values.
Default Configuration
The default configuration is equivalent to the following configuration file: