Software AG Products 10.7 | Administering Integration Server | Configuring Ehcache on Integration Server | Working with Cache Managers | Manually Editing a Cache Manager Configuration File
 
Manually Editing a Cache Manager Configuration File
If you are familiar with the structure of an Ehcache configuration file, you can use the following procedure to modify the parameters in a cache manager configuration file. You might do this, for example, to add or edit certain cache parameters that are not shown in Integration Server Administrator.
Note:
Generally speaking, you should use the Integration Server Administrator to modify a cache manager or a cache. Edit the configuration file manually only when you need to edit parameters that are not exposed in the Integration Server Administrator user interface.
Be aware that when you view a configuration file that was generated by Integration Server Administrator, the file will not contain entries for parameters that use their default settings. Integration Server Administrator only writes required parameters to the configuration file and parameters whose values are different than their default values. For example, if you create a new cache using Integration Server Administrator and you leave the Disk Expiry Thread Interval at its default setting, the Integration Server Administrator does not include the <DiskExpiryThreadIntervalSeconds> element in the configuration file. It includes this element only if you change Disk Expiry Thread Interval from its default setting.
*To manually edit a cache manager configuration file
1. Go to the Integration Server_directory \instances\instance_name\config\Caching directory and locate the configuration file that you want to edit.
2. As a precaution, make a backup copy of the configuration file before you proceed.
Note:
Because Integration Server attempts to generate cache managers from the XML files it finds in the Integration Server_directory \instances\instance_name\config\Caching directory, either store your backup copy in another directory or change its name so that it does not have an “.xml” file extension.
3. Open the configuration file in a text editor and modify it as needed. When editing the file, keep the following points in mind:
*Integration Server requires all cache managers that connect to a Terracotta Server Array to run with rejoin enabled. If the rejoin=”true” attribute is present in the <terracottaConfig> element, do not remove it.
*Integration Server requires all distributed caches to run in nonstop mode. Never remove the <nonstop> option from a distributed cache definition.
*Integration Server does not preserve comments in its cache manager configuration files. If you add comments to the configuration file while you are editing it, be aware that those comments will be discarded the first time that someone edits the configuration file using Integration Server Administrator.
For information about the parameters in a cache manager configuration file, see Ehcache product documentation for 2.8 at http://ehcache.org/documentation.
4. After you save the configuration file, use one of the following techniques to reinitialize the cache manager whose configuration file you edited.
*Restart Integration Server.
*Start the cache manager (if it is not already running) and then immediately reload it (to force it to read the updated configuration file from disk). For procedures, see Starting a Cache Manager and Reloading a Cache Manager.
*Reload the cache manager (if it is already running). For procedures, see Reloading a Cache Manager.
5. Use Integration Server Administrator to view the cache manager and its caches. If you need procedures for this step, see Viewing or Modifying a Cache Manageror Viewing or Modifying Cache Settings.
If the cache manager or the cache is not listed in the Integration Server Administrator or if it is not functioning properly, consult the server log or the Ehcache log to see whether errors occurred during the initialization process. For information about viewing the Ehcache log, see Logging Ehcache Activity. If there are problems with the configuration file (for example, if Integration Server cannot parse the file or the file contains a duplicate cache manager name), Integration Server records an error message in the server log and writes a full stack trace to the error log.
6. If you modified any of the cache-wide parameters for a distributed cache (which are the Maximum Elements in Memory, Eternal, Time to Live, Time to Idle, Maximum Entries in Cache, and Logging parameters), perform the following steps to put your changes into effect:
a. In Integration Server Administrator, go to Settings > Caching.
b. Click the cache manager containing the cache that you modified.
c. Under Cache List, click the cache that you modified.
d. Click Save Changes.
This step puts the cache-wide settings into effect on this Integration Server and all other Integration Servers that use the distributed cache.