Summary: JVM Settings Configuration Section.

JVM Configuration

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.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="GigaSpaces" type="GigaSpaces.Core.Configuration.GigaSpacesCoreConfiguration, GigaSpaces.Core"/>
  </configSections>
  <GigaSpaces>
    <JvmSettings>
      <JvmMemory InitialHeapSizeInMB="32" MaximumHeapSizeInMB="256"/>
      <JvmDll Mode="Custom" Path="C:\Myjvm\jvm.dll"/>
      <JvmClassPath>
        <add Path="C:\MyClassPath1"/>
        <add Path="C:\MyClassPath2"/>
      </JvmClassPath>
      <JvmBootClassPath>
        <add Path="C:\MyBootClassPath1"/>
        <add Path="C:\MyBootClassPath2"/>
      </JvmBootClassPath>
      <JvmCustomOptions IgnoreUnrecognized="false">
        <add Option="-Xdebug"/>
        <add Option="-Xnoagent"/>
        <add Option="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000"/>
      </JvmCustomOptions>
    </JvmSettings>
  </GigaSpaces>
</configuration>

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:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="GigaSpaces" type="GigaSpaces.Core.Configuration.GigaSpacesCoreConfiguration, GigaSpaces.Core"/>
  </configSections>
  <GigaSpaces>
    <JvmSettings>
      <JvmMemory InitialHeapSizeInMB="16" MaximumHeapSizeInMB="256"/>
      <JvmDll Mode="Client"/>
    </JvmSettings>
  </GigaSpaces>
</configuration>
GigaSpaces.com - Legal Notice - 3rd Party Licenses - Site Map - API Docs - Forum - Downloads - Blog - White Papers - Contact Tech Writing - Gen. by Atlassian Confluence