Precompile rate routines JAR file

Startup time in a PolicyCenter installation with a large number of rate routines can be very long. You can improve system startup time by precompiling rate routines into a JAR file and building the JAR file into the PolicyCenter application. This also improves performance when first accessing rate routines. This feature is not enabled in the base configuration.

When you use this feature, you generate and download the rate routines JAR file in the stage/test environment. In the base configuration, the JAR file contains rate routines from all Active rate books. You download the JAR file from the stage/test environment and include it in the production build of PolicyCenter.

Note:

The precompile rate routine JAR file feature is not supported on JBoss application servers.

Requirements

Precompile rate routines JAR requires that you adhere to the following:

  • You must adhere to the rate book lifecycle as described in Rate book lifecycle and moving to production. In the lifecycle, the rate book moves to Approved status in the stage/test environment. The rate book is imported to the production environment and then updated to Active status.

  • All rate routines used in rating must be in one of the rate books returned by RateRoutinesToExportToJAR getter of the rate book preload plugin. PolicyCenter throws an exception when it attempts to use a rate routine that is not in the list of rate books.

    For example, rate book R contains rate routine X, and rate book R is not in the list of rate books returned by the plugin. If rating attempts to use rate routine X, PolicyCenter throws an exception, even if R is in Active status. PolicyCenter relies on the list of rate book returned by the RateRoutinesToExportToJAR getter.

Incremental updates to the JAR file on the production system

PolicyCenter keeps the JAR file up-to-date by responding to changes in rate books. In the base configuration, the JAR file is updated when a rate book is imported from XML or when a rate book is promoted to Active status. (The JAR file is updated only if the rate book's rate routines are not in the JAR file.) This enables you to make changes to rate books without having to regenerate the JAR file and rebuild and redeploy PolicyCenter.

Note: If the production environment contains Active rate books that are not in the stage/test environment, then those rate routines are initially missing from the JAR file created in the stage/test environment. When the production system starts up, PolicyCenter updates the JAR file with the missing rate routines. However, this increases startup time.

Propagating major changes to the production system

If you are making major changes that require rebuilding the PolicyCenter application, then generate and download the rate routines JAR file on the stage/test system as part of the rebuilding process. Then include it in the production system.

Another reason for regenerating the JAR file is that rate books can expire. PolicyCenter never removes any routines that are already in the JAR, it only adds new routines. So the JAR file may contain rate routines from expired rate books. These rate routines, which will never be used for rating, will be preloaded.