Configuring Ehcache using Terracotta Server Array
From AgileApps Support Wiki
If AgileApps platform is on a distributed setup, metadata resides in the caches and the caches are backed by Terracotta Server Array. If the caches do not synchronize, then a particular node of AgileApps platform is working on stale data. Terracotta Server Array provides distributed caching functionality to the case collision use case or an advanced use case, as case collision use case requires cache shared with the application servers. The session management for failovers depends on distributed cache. Terracotta Server Array provides support to the caching mechanism.
Configuring Ehcache
- Construct a Terracotta Server Array (TSA)
- Update the ehcache.xml configuration file available at {install_dir}/profiles/LJP/configuration/tomcat/conf/RN/ehcache.xml
- Uncomment :<syntaxhighlight lang="javascript" enclose="div"> </syntaxhighlight>
- Provide in the URL attribute, the host and port of the machine where TSA is installed.
- Uncomment :<syntaxhighlight lang="javascript" enclose="div"> </syntaxhighlight>
- Update the networking.properties configuration file available at {install_dir}/profiles/LJP/configuration/tomcat/conf/RN/networking.properties
- Set CacheType=2
- Set CacheName=distributed
Frequently asked questions
- How should the URL be written if there are multiple TSA nodes?
- For multiple node TSA, the URL must be comma separated [host1]:[port1], [host2]:[port2], [host3]:[port3]
- Example: url=”host1:9510,host2:9510,host3:9510”
- 2. Can I leave “<terracotta/>” uncommented if I have not installed TSA? As it takes effect only when the CacheName specified in the networking.properties points to “<terracotta/>”.
- No, the ehcache CacheManager loads the configured file and on identifying this tag, the ehcache CacheManager tries to locate a valid TSA instance, which if not present can cause issues.