Configuring the JVM for .NET services

Explains how to configure your Java Virtual Machine for Content Delivery services.

About this task

The Content Delivery .NET services use a Java Virtual Machine (JVM). By default, these services start the JVM using system defaults. However, you might want to change these system defaults for your Content Delivery .NET services.

This topic explains how you can modify the JVM call from all COM services by editing the Windows Registry. This topic assumes that you are familiar with regedit or that you know how to manipulate the registry in some other way.

One specific application of this functionality is to specify a proxy server (see Configuring a proxy server).

The following .NET services access a Java Virtual Machine:

  • Tridion Cache Channel Service
  • Tridion Content Broker
  • Tridion Content Deployer
  • Tridion Content Distributor Transport Service
  • Tridion Dynamic Linking
  • Tridion WAI

To configure the Java Virtual Machine for all .NET services, do the following:

Procedure

  1. Start a registry editor, regedit for example, on the Content Delivery server.
  2. Depending on the bitsize of your operating system (32 bits or 64 bits), check for the existence of a registry subkey Tridion in one of the following locations:
    • On a 32-bit system, search for this subkey in HKEY_LOCAL_MACHINE\SOFTWARE
    • On a 64-bit system, search for this subkey in HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node

    If you cannot find this key, create it.

  3. In the HKEY_LOCAL_MACHINE\SOFTWARE\Tridion subkey, create a subkey called Content Delivery.
  4. In the HKEY_LOCAL_MACHINE\SOFTWARE\Tridion\Content Delivery subkey, you can create a subkey called General.
  5. You can now add one, more or all of the following entries to this subkey:
    TRIDION_HOME (the SDL Tridion home directory)

    Each .NET service needs to know where to find certain SDL Tridion files to include in its classpath. See System classpath for details.

    If you specify a value for TRIDION_HOME, the .NET services will use that value as their starting point for finding files.

    This is useful if you have Content Manager and Content Delivery installed on the same machine, and want to place the Content Delivery-related files in a different directory than the Content Manager.

    JREVersion (the version of the Java Runtime Engine)

    By default, Content Delivery sets the JRE version to whatever it finds as the value of the following registry subkey:

    HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime
    Environment\CurrentVersion

    If you specify a registry value for the JRE for one or all services, then that version will be used instead of the default one. The version must, of course, be installed on the Content Delivery server. To see which versions of the JRE are installed, look at the subkeys found in the following registry subkey:

    HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime
    Environment\

    Set the JREVersion entry to the name of one of the subkeys (that is, a valid version number such as "1.3.1_13" or "1.4"). If you fill in a version that is not installed, you cannot start the affected .NET services after you stop them.

    jvmarg1, jvmarg2, jvmarg3, etc (Java Virtual Machine startup arguments)

    By default, Content Delivery starts up the Java Virtual Machine (JVM) with its own default parameters. To add one parameter to your .NET services, create a registry entry jvmarg1 in the Generalsubkey. To add two parameters, create two registry entries, jvmarg1 and jvmarg2, and so on. Give each registry entry the value of a JVM parameter, including an initial dash (-). For example, to set the maximum amount of memory to 256 MB, add a jvmarg1 registry entry and give it the value -Xmx256M.

    To extract startup log files from the .NET services and write them to a file in a folder location, specify a jvmargX entry (where X is a number) and set it to the value log=<fullpath>, where <fullpath> is the full path to a folder location. For example, a valid value could be log=D:\logfiles\services.

    Please note the following:

    • If you supply a jvmargX registry entry that sets the classpath (that is, with a value that starts with -Djava.class.path or with -cp), the service will not work, because your classpath will override the default one set by the .NET service itself.
    • You can see in Windows Event Viewer which startup options that are applied, in the Tridion Content Manager category.
  6. Close the registry editor.
  7. Stop and start all Content Delivery .NET services affected by your changes.

Results

When you now start a Content Delivery .NET service, Content Delivery applies the settings you specified.