These details are repeated from the previous section on running a productionplatform
This describes how to set up Rice instances for a load-balanced production environment across multiple computers.
The configuration parameter ${environment} must be set to the text: prd
When the configuration parameter ${environment} is set to prd, the code triggers:
Sending email to specified individuals
Turning off some of the Rice “back doors”
The high-level process for creating multiple Rice instances:
Ensure that these are set up properly so no additional configuration is needed during installation:
Quartz is configured properly for clustering (there are various settings that make this possible).
The initial software setup has the proper configuration to support a clustered production environment.
Rice’s initial settings are in the file, common-config-defaults.xml.
Here are some of the parameters in the common-config-defaults.xml that setup Quartz for clustering:
<param name="useQuartzDatabase" override="false">true</param> <param name="ksb.org.quartz.scheduler.instanceId” override="false">AUTO</param> <param name="ksb.org.quartz.scheduler.instanceName" override="false">KSBScheduler</param> <param name="ksb.org.quartz.jobStore.isClustered" override="false">true</param> <param name="ksb.org.quartz.jobStore.tablePrefix" override="false">KRSB_QRTZ_</param>
If it becomes necessary to pass additional parameters to Quartz during rice startup, just add parameters in the rice-config.xml file prefixed with ksb.org.quartz.*
The parameter useQuartzDatabase MUST be set to true for Quartz clustering to work. (This is required because it uses the database to accomplish coordination between the different scheduler instances in the cluster.)
Ensure that all service bus endpoint URLs are unique on each machine: Make sure that each Rice server in the cluster has a unique serviceServletUrl parameter in the rice-config.xml configuration file.
One way to accomplish this is to pass a system parameter into the JVM that runs the Tomcat server that identifies the IP and port number of that particular Tomcat Server. For example:
-Dhttp.url=129.79.216.156:8806
You can then configure your serviceServletUrl in the rice-config.xml to use that IP and port number.
<param name="serviceServletUrl">http://${http.url}/${app.context.name}/remoting/</param>
You could have different values for serviceServletUrl in the rice-config.xml on each machine in the cluster.
If you are using notes and attachments in workflow, then the attachment.dir.location parameter must point to a shared file system mount (one that is mounted by all machines in the cluster).
The specifics of setting up and configuring a shared file system location are part of how you set up your infrastructure environment. Those are beyond the scope of this Guide.
In general, to accomplish a load-balanced clustered environment, you must implement some type of load balancing technology with session affinity (i.e., it keeps the browser client associated with the specific machine in the cluster that it authenticated with). An example of a load balancing appliance-software is the open source product, Zeus.