If no caching engine is provided, the Infinity Process Platform engine retrieves entities per request using a transaction bound memory cache. Some entities are not expected to be changed very often, but are frequently retrieved. If a caching engine is provided, and the caching switch property is not set to false, these entities are stored and retrieved in cross transaction caches. These include the following entities:
To turn off the use of caches, even if a caching engine is detected, add the property Infinity.Engine.Caching to your server-side carnot.properties file and set it to false.
Infinity.Engine.Caching = false
The cache engine is not part of the Infinity Process Platform distribution, you have to install your own caching engine. The following caching engines are currently supported by the Infinity Process Platform:
The configuration required to connect to the client cache engine is to add the corresponding adapter to the Infinity Process Platform engine classpath, either in your carnot.ear file or in the global application server classpath.
The actual configuration of the cache engine should be performed according to the documentation of the respective caching engines installed in your environment.
Please note that the provider should be transaction aware.
In case an installed cache engine is present in the client environment, Infinity Process Platform detects it and uses it. If no cache engine is found or the installed cache engine is not supported, only the transaction bound memory cache is used.
In case a cache engine is found, the modification pattern of the cacheable entities is changed, in that all changes will be made not on the object retrieved from the cache, but on a different object, either freshly retrieved from the database or cloned from the cached object. This new object will replace the old one in the cache.
The retrieval of cacheable entities is directed to the respective caches whenever possible.
The following example demonstrates the usage of Hazelcast on WebSphere 7. Hazelcast is a clustering and scalable data distribution platform. For the second level caching functionality the Infinity Process Platform leverages Hazelcast's distributed Map capabilities. Please refer to http://www.hazelcast.com/product.jsp for detailed information on Hazelcast.
To set up Hazelcast on WebSphere 7:
Infinity.Engine.Caching = true Infinity.Engine.Caching.CacheFactory = com.infinity.bpm.rt.integration.cache.hazelcast.HazelcastCacheFactory Infinity.Engine.Caching.Hazelcast.TxMode = rw Infinity.Engine.Caching.Hazelcast.ConnectionFactoryJndiName = HazelcastCF Infinity.Engine.Caching.Hazelcast.GlobalCacheName = ipp-2nd-level-cache
The engine now uses Hazelcast as second level cache provider. This can be monitored as cache size and Hit Rate will change after logging into the Infinity Process Platform portal, for example.
The cache is configured to remove cached entries after at most 60 seconds for the time
being. This is why Infinity Process Platform will eventually hit the database again to
repopulate the cache. The time to
live can be adjusted in the hazelcast.xml configuration file
Please note that with this setup there will be only one node. Hazelcast either detects or is explicitly told about additional node members. For details on this issue please refer to the Hazelcast documentation or the hazelcast.xml file.