Preloading Gosu classes
PolicyCenter provides a preload mechanism to support preloading of Gosu classes, as well as other primary classes. The intent is to make the system more responsive the first time requests are made for that class. This is meant to improve application performance by preloading some of the necessary application types.
To support this, you can add the following to the preload.txt file in :
Static method invocations |
Static method invocations dictate some kind of action and have the following syntax:
The referenced method must be a static, no-argument method. However, the method can be on either a Java or Gosu type. In the base configuration, Guidewire includes some actions on the gw.api.startup.PreloadActions class. For example, to cause all Gosu types to be loaded from disk, use the following:
You can add additional lines that call static methods. |
Type names |
Type names can be either Gosu or Java types. You must use the fully-qualified name of the type. For any Java or Gosu type that you list in this file:
|
server and env attributes. For
example:gw.api.startup.PreloadActions#loadRestAPIDefintions env="prod" server="#rest"The logging category Server.Preload provides DEBUG level
logging of all actions and preloaded types.
See also
Populate the list of types
Before you begin
Procedure
- Navigate to the Loaded Gosu Classes page ().
- Copy and paste the list that you see there into the preload.txt file.
Results
The next time that you start the application server, PolicyCenter compiles those types on startup.
