JVM Controller Command Examples

Configuring and Managing Java Virtual Machines 10-7 one JVM, and one of the instances of your loan class changes interestRate, all of the other instances will be affected which is what you want. However, if the JVM controller has one or more child JVMs, there may be at least two JVMs. If interestRate changes in one JVM, the loan instances in the other JVMs wont see this new value. For more information about managing child JVMs, see Section 10.2, About Child Java Virtual Machine Processes . Prior to JVM pooling, if you changed interestRate it would not affect any other instances because each Oracle Forms Runtime process had its own in-process JVM. If you rely on static variables to share information between instances of your class, ensure that no child JVM is spawned by setting maxsessions to 65535.

10.6 Overview of JVM Configuration

To configure JVM using Fusion Middleware Control, perform the following steps:

1.

Using Fusion Middleware Control, add a new configuration section or modify an existing section in formsweb.cfg to enable or disable use of JVM controller for applications. For more information, refer to Section 10.8.6, Forms Configuration File Settings . 2. Ensure CLASSPATH is updated in default.env or in jvmcontrollers.cfg. 3. Using Fusion Middleware Control, configure the JVM parameters. For more information, refer to Section 10.8.3, Managing Parameters . 4. Start the JVM controller. For more information, refer to Section 10.8.5, Starting and Stopping JVM Controllers with Fusion Middleware Control .

10.7 Managing 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. You can only access the JVM controllers on the same computer from which they are running.

10.7.1 JVM Controller Command Examples

This section describes examples of JVM controller commands. For a detailed explanation on the example, see Section 10.8.7, Startup Example. ■ dejvm -start jvmcontroller=hrJVM Starts a JVM controller with ID hrJVM. The controller name hrJVM is defined as a named section in the 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 is myJVM. Since no option was specified, and there is no named section in jvmcontrollers.cfg, the JVM options parameter is Note: 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. 10-8 Forms Services Deployment Guide -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 myJavahrClasses 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=myJavamyClasses;moreJavamoreClasses The controller has jvmoptions=-Xms512m -Xmx1024m as defined in the default section of jvmcontrollers.cfg. maxsessions is 100 which overrides the default section, and classpath is myJavamyClasses;moreJavamoreClasses. 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.

10.7.2 Command Restrictions