Studio and the DCEVM
The PolicyCenter application server and Guidewire Studio require a JVM (Java Virtual Machine). The version of the JVM depends on the servlet container and operating system on which the application server runs.
Guidewire strongly recommends the use of the DCEVM for development in the QuickStart environment. Guidewire does not support the DCEVM for other application servers or in a production environment.
The Dynamic Code Evolution Virtual Machine (DCEVM) is a modified version of the Java HotSpot Virtual Machine (VM). The DCEVM supports any redefinition of loaded classes at runtime. You can add and remove fields and methods and make changes to the super types of a class using the DCEVM. The DCEVM is an improvement to the HotSpot VM, which only supports updates to method bodies.
DCEVM Limitations
If you reload Gosu classes using hotswap on the DCEVM, it is possible to add new static fields (again, only on the DCEVM). However, Gosu does not execute any initializers for those static variables. For example, if you add the following static field to a class:
public static final var NAME = "test"Gosu adds the NAME field to the class dynamically.
However, the value of the field is null
until you restart the server (or Studio, if you are running the code
from the Studio Gosu Scratchpad). If you need to initialize a newly added
static field, you must write a static method that sets the variable and
then executes that code.
For example, suppose that you added the following static method to class MyClass:
public static var x : int = 10To initialize this field, write code to set the static variable to the value that you expect and then execute that code:
MyClass.x = 10This does not work if the
field is final.
null values on existing instances
of the object. However, any newly-constructed instances of the object
will have the field initialized. See also
- For details on how to select the proper JVM for your installation, see Installing Java.
- The Dynamic Code Evolution Virtual Machine
