Ehcache is used to support high availability and scalability
replication of application cached data across different nodes in the
cluster.
About this task
You can define the Ehcache configurations present in the
configuration file on following location: <Distributed
Marketing Home>/conf/collaborate_ehcache.xml.
Note: Configuration
changes are not required if IBM® Distributed Marketing is
not deployed on a web-app server cluster.
IBM Distributed Marketing Ehcache
configuration support two different types of peer discoveries: automatic
peer discovery and manual peer discovery.
Procedure
- For automatic peer discovery, you can change the multicastGroupAddress
and multicastGroupPort for your local network settings:
<cacheManagerManagerPeerProviderFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
properties="peerDiscovery=automatic, multicastGroupAddress=230.0.0.1,
multicastGroupPort=3232, timeToLive=32"/>
<cacheManagerPeerListenerFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"/>
- For manual peer discovery, you can define cluster nodes
and RMI ports to replicate cached data across cluster nodes. You
can change the machine name and port as per your IBM Websphere cluster
environment configuration.
<cacheManagerPeerProviderFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
properties="peerDiscovery=manual,
miUrls=//<machineA>:40000/DMEventCache//<machineB>:40000/DMEventCache
//<machineA>:40000/DMSessionObjectLockCache//<machineB>:40000/DMSessionObjectLockCache
//<machineA>:40000/DMListLockCache//<machineB>:40000/DMListLockCache"/>
<cacheManagerPeerListenerFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
properties="port=40000, socketTimeoutMillis=20000"/>
- You can add more RMI URLs in the following format in case
of you have more than two nodes participating in the IBM Websphere
application server cluster.
miUrls=
//<machineA>:40000/DMEventCache
//<machineA>:40000/DMSessionObjectLockCache
//<machineA>:40000/DMListLockCache
- You will also need to enable cache replication for individual
cache by uncommenting the configurations in collaborate_ehcache.xml for
DMEventCache, DMSessionObjectLockCache, and DMListLockCache.