Manage JVM Controllers from the Command Line

If you manage JVM controllers from the command line, you must know the options to start and stop them, as well as specify the environment.

Caution:

Starting the JVM Controller on the command line is strongly discouraged. Controlling and configuring the JVM Controller from within Fusion Middleware Control is recommended. See Managing JVM Pooling from Fusion Middleware Control.

The recommended way to start the JVM Controller is to allow the application to initiate the startup. It will start when an associated application is run for the first time.

To start the controller automatically, add otherparams=jvmcontroller=<YOUR CONTROLLER NAME> to the URL used to start the application. This will start the controller if it is not already running.

If the controller is already running, this setting simply instructs the controller to add this session to the existing pool.

You can only access the JVM controllers on the same computer from which they are running.

The mechanics for controlling the JVM controller as described in this chapter are mostly relevant at the command line. It is easier to use Fusion Middleware Control with its user-friendly screens and online help. Fusion Middleware Control users are still urged to read through the following information, however, to understand what the different fields and options mean, and how the JVM controller works.

JVM Controller Command Examples

This section provides some sample JVM controller commands. For a detailed explanation on the example, see Startup Example.

You must set the environment variables in Table -32 before attempting to start the controller form the command line:

Table -32 Required Environment Variables

Environment Variable Value
ORACLE_HOME

The fully-qualified path that points to the Oracle Home containing the Oracle Forms installation. For example:

C:\oracle\middleware\Oracle_Home

FORMS_INSTANCE

The fully-qualified path that points to the Forms Instance containing the configurations associated with the JVM Controller to be used. For example:

C:\oracle\middleware\user_projects\domains\base_domain\config\fmwconfig\components\FORMS\instances\forms1

FORMS_INSTANCE_NAME

The name of the Forms instance that contains the configurations associated with the JVM Controller to be used. For example:

forms1

DOMAIN_HOME

The fully-qualified path that points to the Domain containing the configurations associated with the JVM Controller to be used. For example:

C:\oracle\middleware\user_projects\domains\base_domain

Here are some sample JVM controller commands:

Table -33 Sample JVM Controller Commands

JVM Controller Command Description
dejvm -start jvmcontroller=hrJVM

Starts a JVM controller with ID hrJVM.

The controller name, hrJVM, is defined as a named section in the jvmcontrollers.cfg configuration file. Therefore, JVM options and classpath parameters are taken from the configuration file.

maxsessions is 50 as defined in the Default section, and other parameters take their default values.

dejvm -start jvmcontroller=myJVM

Starts a JVM controller with ID myJVM.

Since no option was specified, and there is no named section in the jvmcontrollers.cfg file, the JVM options parameter is "-Xms512m -Xmx1024m" and maxsessions=50 as set in the Default section.

The other parameters take on their default values. For instance, the CLASSPATH value is the system CLASSPATH.

dejvm -start jvmcontroller=hrJVM jvmoptions="-Xms128m -Xmx256m" maxsessions=75

Sets the classpath to /myJava/hrClasses as defined in the named section.

JVM options are "-Xms128m -Xmx256m" because the command line overrides the jvmcontrollers.cfg file. Similarly, maxsessions is 75.

All other parameters take on their default values.

dejvm -start jvmcontroller=myJVM maxsessions=100 classpath=/myJava/myClasses;/moreJava/moreClasses

The controller has jvmoptions="-Xms512m -Xmx1024m" as defined in the default section of the jvmcontrollers.cfg file. maxsessions is 100 which overrides the default section, and the classpath is /myJava/myClasses;/moreJava/moreClasses.

All other parameters take on their default values.

dejvm -stop jvmcontroller=hrJVM

Stops the hrJVM controller. It must already be started for you to issue this command successfully.

Command Restrictions

Keep these command restrictions in mind:

  • The commands are case sensitive.

  • You can only issue one command at a time to a JVM controller.

  • You can only issue a command to one JVM controller at a time.

The available commands for the JVM controller (or the dejvm process) are specified in Table -34. If you are using Enterprise Manager, there are screens that have an interface for issuing these commands. If you are using the command line, you may not be able to manage the JVM controller using the Enterprise Manager.

Start Command Parameters

The following table describes the JVM parameters used to start the JVM from the command line.

Table -34 JVM Parameters

Parameter Description

jvmcontroller

Enter a name for this JVM. This name must contain a legal Oracle identifier that starts with a letter and contains an alphanumeric character, '_', '$' or '#' . An Oracle identifier has a maximum length of 30 bytes.

Hint: You may want to enter a name based on the application that will be accessing it. You cannot change the name of this JVM controller later.

maxsessions

Specifies the maximum number of concurrent Oracle Forms sessions this JVM will serve before a new JVM is spawned. This value will override any set for the default JVM controller.

classpath

When you specify a classpath, it will override the system classpath or any classpath specified in your environment or any classpath set for the default JVM controller.

jvmoptions

Enter any valid options to pass to the JVM. This value will override any set for the default JVM controller. Refer to the Oracle Java documentation for a list of valid JVM startup options.

logdir

Leave Log Directory blank to use the log location for the default JVM controller. If any other directory is set, the log file may not be accessible through Enterprise Manager.

logging

  • off - Logging not use

  • info - Reports general information about JVM Controller activity. (default)

  • warn - Reports potentially harmful conditions that may require further investigation.

  • error - Reports errors that have occurred. The application may continue running, but functionality may be reduced.

  • crit - Reports critical failures that resulted in aborting the JVM Controller.

  • debug - Reports verbose debugging information