![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |
TIBCO Administrator includes the EHCache product that provides a simple, fast and thread-safe cache facility. A default cache configuration is configured in the ehcache-failsafe.xml file, which is included in ehcache-1.7.2.jar. It is used unless you create and configure a custom cache file. The default configuration stores 5000 objects of each object type in memory without expiration.EHCache allows you to configure caching per object type. You can specify that only certain objects are cached after the first iteration. More information about configuring EHCache is available from the following location: http://ehcache.sourceforge.net/documentation/
1. Use winzip or another similar utility to unpack the EHCache jar file in: TIBCO_HOME\tpcl\version\lib\ehcache-1.7.2.jar
2. Copy the ehcache-failsafe.xml file to a working directory and use an XML editor to configure the file for your environment.To configure the default cache to use for all object types in the store, edit the defaultCache configuration in the ehcache-failsafe.xml file. To configure a cache for a specific object type, create a cache configuration with the full Java class name of the object type in the ehcache-failsafe.xml file. In such a configuration, typically only the maxElementsInMemory value is changed. For example:
3. After modifying the ehcache-failsafe.xml file, copy it to the TIBCO_TRA_DOMAIN_HOME/domain-name directory (the same directory that contains the AdministrationDomain.properties file). Note that if a cache is not specified for an object type, the default cache's configuration is used to create a new cache for the object type.
4. Copy the file to domainName_ehcache.xml and AUTH_domainName_ehcache.xml for each domain, or put the ehcache-failsafe.xml file back into the jar file for use with all domains.Periodically, cache statistics can be dumped to a log file. This provides information needed to alter the cache configurations. Each store can configure how often it wants all of its cache statistics dumped to the INFO role of the Administrator.log file. The following properties can be added to and configured for each store (in AdministrationDomain.properties and AuthorizationDomain.properties):
• CacheDumpInterval: Set to the number of milliseconds to dump the cache statistics to the INFO role. If less then 0 or not set, the statistics are never dumped. By default, this property is not set.
• CacheDumpSizeEnabled: Set to "true" if the amount of memory used by the cache should be dumped as well. This is a separate option because determining the size of the cache is an expensive operation — around one second per MB of cache size. All use of the cache stops for this period and the application will seem to stop as well. If this property is not set, it defaults to "false".
See the EHCache documentation for details on each of these attributes (http://ehcache.sourceforge.net/documentation/). The inMemorySize element is the number of bytes of the objects in the cache. This number is the size of the Java serialization of the objects and does not account for any transient variables (which should not significantly add to the size).The name of the cache is a concatenation of the following. The ClassLoaderHashCode element is a number (an internal identifier).Similarly, the name of a cache that is specific to an object type is a concatenation of the following. The storeImplementationClassName element can be removed if each application domain is uniquely named.
![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |