Java (JVM) configuration

These DataSource configuration items define how the Java Virtual Machine (JVM) is set up to execute Java modules in DataSource applications.

Such modules include:

Contents:

jvm-global-classpath

jvm-global-classpath specifies the Java classpath to a Java module or modules.

You can specify multiple classpaths on the same line, using a space separator, like this:

jvm-global-classpath %r/lib/java/jmx-child-classloader.jar %r/lib/java/common-jmx.jar

You can also specify multiple classpaths, using a separate jvm-global-classpath item for each one; for example:

jvm-global-classpath %r/lib/java/jmx-child-classloader.jar
jvm-global-classpath %r/lib/java/common-jmx.jar

The classpath can contain the %r parameter; at run time, %r is replaced by the root directory (application-root) under which the DataSource application runs, so you can define the classpath location relative to this.

You can also specify a classpath for a specific class, using the classpath option of add-javaclass.

Use in: C

Syntax: jvm-global-classpath <classpath>

Type: array of strings

Default value: %r/lib/java

jvm-location

jvm-location specifies the location of the file containing the Java Virtual Machine. This location must be the complete (absolute) file path, including the name of the JVM file. For JVMs running on Linux, the filename is usually libjvm.so, for JVMs on Windows it's jvm.dll

You should set up the location of the file containing the Java Virtual Machine for Liberator, Transformer and C-based Adapter blades by running the Deployment Framework command ./dfw java. See How can I.. Configure a DataSource application’s JVM.
Don't define jvm-location explicity for these components and blades. 

Use in: C

Syntax: jvm-location <absolute-file-path-and-JVM-filename>

Type: string

Default value: [none]

jvm-options

jvm-options specifies startup options for the Java Virtual Machine. You can specify any of the valid Java command line options.

You can put multiple options in one instance of jvm-options, for example:

#
# Specify JVM heap size.
#
jvm-options -Xms256m -Xmx256m

Or, for convenience, you can spread the options across multiple instances of jvm-options, for example:

#
# Specify JVM heap size.
#
jvm-options -Xms256m 
jvm-options -Xmx256m

Use in: C

Syntax: jvm-options <java-command-line-options>

Type: array of strings

Default value: [none]

add-javaclass

add-javaclass specifies a Java class that implements a Java module used by the DataSource application. This configuration item is mainly used to specify the Java modules used within Liberator and Transformer; in particular, you use it to specify the Java module(s) of a Transformer Service blade (see blade types).

For examples of how to use add-javaclass within Caplin Platform blades, see:

Use in: C

Syntax:

add-javaclass
   class-id   [string]
   class-name [string]
   classpath  [array of strings]
end-javaclass

The options for add-javaclass are:

Option Type Default Description
class-id string [none] A short identifier of the Java class. When the Java module is part of a Java-based Transformer Service blade, class-id must be set to the blade name.
class-name string [none] The fully-qualified class name of the Java module to load.
classpath array of strings [none]

One or more space-separated Java classpaths that define where the class in class-name is to be loaded from; for example:
classpath %r/lib/java/jmx-child-classloader.jar %r/lib/java/common-jmx.jarclasspath 

 

You can have multiple occurrences of classpath in the same add-javaclass item; for example: 
classpath %r/lib/java/jmx-child-classloader.jar
classpath %r/lib/java/common-jmx.jar


See also: