配置 ehcache
ehcache 是一个开放式源代码
Java
™
分布式高速缓存,可用于通用高速缓存、
Java
™
EE 和轻量级容器。集群中的每个节点都可以使用同一
plan_ehcache.xml
文件,或者也可以为每个节点指示不同的
plan_ehcache.xml
文件。
对于集群中的安装,可以编辑
plan_ehcache.xml
文件,以使对模板或商品文件夹的更改不需要重新启动系统。根据您是使用 RMI 还是多点广播进行高速缓存复制,选择以下某个过程。
如果安装是自先前版本升级而来,那么
plan_ehcache.xml
文件中的某些或所有部分可能不存在。在这种情况下,请如以下部分中所示添加和编辑文件。
使用 RMI 配置 ehcache
具有以下体系结构的
Marketing Operations
系统通常使用 RMI:
浏览至
<IBM_EMM_Home>
\
<MarketingOperations_Home>
\conf
目录,并在文本编辑器中打开
plan_ehcache.xml
文件。然后进行以下编辑:
对该文件的以下部分取消注释。
必须定制以粗体显示的项(machineA、machineB 和端口)以反映您的环境。使用标准主机名称,提供集群中所有机器以管道符分隔的列表。
<!--
<cacheManagerPeerProviderFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
properties="peerDiscovery=manual,
rmiUrls=//
<machineA>:40000
/planApplicationCache|//
<machineB>
:
40000/planApplicationCache"/>
<cacheManagerPeerListenerFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
properties="port=
40000
, socketTimeoutMillis=20000"/>
-->
对该文件的以下部分取消注释。
<!--
<cacheEventListenerFactory
class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
properties="replicateAsynchronously=true, replicatePuts=true,
replicateUpdates=true, replicateUpdatesViaCopy=true,
replicateRemovals=true"/>
<cacheEventListenerFactory
class="com.unicacorp.uap.common.cache.PlanCacheEventListenerFactory
"net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory" />
-->
如果文件中存在以下行,请除去这些行。
<bootstrapCacheLoaderFactory class=net.sf.ehcache.distribution.
RMIBootstrapCacheLoaderFactory"/>
使用多点广播配置 ehcache
具有以下体系结构的
Marketing Operations
系统通常使用多点广播:
浏览至
<IBM_EMM_Home>
\
<MarketingOperations_Home>
\conf
目录,并在文本编辑器中打开
plan_ehcache.xml
文件。然后进行以下编辑:
对该文件的以下部分取消注释。
必须定制以粗体显示的项(multicastGroupAddress 和 multicastGroupPort)以反映您的环境中的多点广播组和端口。
<!--<cacheManagerPeerProviderFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
properties="peerDiscovery=automatic, multicastGroupAddress=
230.0.0.1
,
multicastGroupPort=
4446
, timeToLive=32"/>
<cacheManagerPeerListenerFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"/>
-->
对该文件的以下部分取消注释。
<!--
<cacheEventListenerFactory
class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
properties="replicateAsynchronously=true, replicatePuts=true,
replicateUpdates=true, replicateUpdatesViaCopy=true,
replicateRemovals=true"/>
<cacheEventListenerFactory
class="com.unicacorp.uap.common.cache.PlanCacheEventListenerFactory" />
-->
另外,如果文件中存在以下行,请除去这些行。
<bootstrapCacheLoaderFactory
class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"/>
Copyright IBM Corporation 2013. All Rights Reserved.