Cache control requires a third party application called ActiveMQ to function. ActiveMQ can be downloaded from the Apache Software Foundation. A direct link to the ActiveMQ download page can be found HERE.
Once downloaded, ActiveMQ will need to be unzipped and installed to the filesystem on the server that will be set up as the manager instance. It can be installed alongside your Apache Tomcat server or in a standalone location.
Once ActiveMQ has been unzipped and installed, it can be started from the activemq.bat found within the bin folder of the installation location. For example, if installed in C:\Program Files\Apache Software Foundation\ActiveMQ 5.9.1, you would look for the activemq.bat file in C:\Program Files\Apache Software Foundation\ActiveMQ 5.9.1\bin\activemq.bat
ActiveMQ can also be installed as a Service (thereby removing the requirement to start/stop ActiveMQ using activemq.bat). Notes on installing ActiveMQ as a service can be found HERE.
For the sake of simplicity and ease of reading, we will use the following to denote our servers:
SERVER1 - This server will host both the manager instance of Tomcat as well as the ActiveMQ application.
SERVER2 - This server will host the secondary instance of Tomcat that will be in the same cache control group as SERVER1.
The steps to enable cache control are as follows:
Install ActiveMQ on the server which you wish to be the manager instance (SERVER1).
Unzip the apache-activemq-X.X.X (X.X.X being the activeMQ version) file to an installation location of your choice.
Start activemq.bat or install ActiveMQ as a service by following the instructions HERE.
Add two WOW Configuration Values, one for CACHE_CONTROL_ALIAS and one for CACHE_CONTROL_GROUP (From the WOW Builder, got to Development Tools --> WOW Utilities --> Keyed Values --> Configuration Values)
NOTE: The value for both properties is GROUPA and must match wow.cache.control.groups in the wow.properties file.
CACHE_CONTROL_ALIAS = CONN_ALIAS_A (Database Alias on the WOW CONNECTION you want caching control enabled on)
CACHE_CONTROL_GROUP = tcp://activemq.server.com:61616 (Replace this with your MQ listener address)
Configure the manager instance server (SERVER1)
Add the following init params to the wow.properties file:
wow.cache.control.groups = GROUPA (same as in configuration values)
wow.cache.control.id = SERVER1 (needs to be UNIQUE to this specific instance)
Restart Tomcat
Configure the second server (SERVER2)
Add the following init params to the wow.properties file:
wow.cache.control.groups = GROUPA (same as in configuration values)
wow.cache.control.id = SERVER2 (needs to be UNIQUE to the specific instance)