【适用范围】
EOS5.2及以上版本
【内容】
一、配置文件wfconfig.xml的部分配置说明
<module name="cluster">
<group name="cluster">
<!--
true:
InstancePool(JB_INVALIDATION_SYNC);
AgentFromCache(JB_INVALIDATION_SYNC);
AgentToCache(JB_INVALIDATION_SYNC);
InvalidCluster(JG_enable);
false:
InstancePool(SMP);
AgentFromCache(ConcurrentHashMap);
AgentToCache(ConcurrentHashMap);
InvalidCluster(JG_disable);
-->
<configValue key="enable">false</configValue>
<!-- SMP: LRU Policy -->
<configValue key="local_lru_max">5000</configValue>
<!-- 存储策略:step-单步存储;batch-批量存储 -->
<configValue key="def_store_strategy">step</configValue>
<!-- Cluster Bind Address: Local IP Address -->
<configValue key="cluster_bind_addr">192.168.0.175</configValue>
<!-- Cluster Name -->
<configValue key="instance_pool_cluster_name">INSTANCE_POOL_CLUSTER</configValue>
<configValue key="agent_from_cluster_name">WF_AGENT_FROM_CLUSTER</configValue>
<configValue key="agent_to_cluster_name">WF_AGENT_TO_CLUSTER</configValue>
<configValue key="invalid_cluster_name">INVALID_CLUSTER</configValue>
<!-- Cluster Port -->
<configValue key="instance_pool_cluster_bind_port">2526</configValue>
<configValue key="agent_from_cluster_bind_port">2527</configValue>
<configValue key="agent_to_cluster_bind_port">2528</configValue>
<configValue key="invalid_cluster_bind_port">2529</configValue>
<!-- Cluster Configuration: WFAgentFromCache/WFAgentToCache/Invalid -->
<configValue key="cluster_config">UDP(mcast_addr=228.1.2.5;mcast_port=45566;ip_ttl=64;ip_mcast=true;
mcast_send_buf_size=150000;mcast_recv_buf_size=80000;ucast_send_buf_size=150000;
ucast_recv_buf_size=80000;loopback=true):PING(timeout=2000;num_initial_members=3; up_thread=false;down_thread=false):MERGE2(min_interval=10000;max_interval=20000):FD(shun=true;
up_thread=true;down_thread=true):VERIFY_SUSPECT(timeout=1500;up_thread=false;down_thread=false):
pbcast.NAKACK(gc_lag=50;retransmit_timeout=600,1200,2400,4800;max_xmit_size=8192;up_thread=false;
down_thread=false):pbcast.STABLE(desired_avg_gossip=20000;up_thread=false;down_thread=false):
UNICAST(timeout=600,1200,2400;window_size=100;min_threshold=10;down_thread=false):
FRAG(frag_size=8192;down_thread=false;up_thread=false):pbcast.GMS(join_timeout=5000;
join_retry_timeout=2000;shun=true;print_local_addr=true):pbcast.STATE_TRANSFER(up_thread=false;
down_thread=false)</configValue>
<!-- WFAgent Cache Configuration -->
<configValue key="agent_cache_IsolationLevel">REPEATABLE_READ</configValue>
<configValue key="agent_cache_InitialStateRetrievalTimeout">20000</configValue>
<configValue key="agent_cache_SyncReplTimeout">15000</configValue>
<configValue key="agent_cache_LockAcquisitionTimeout">10000</configValue>
<configValue key="agent_cache_EvictionPolicyClass">org.jboss.cache.eviction.LRUPolicy</configValue>
<configValue key="agent_cache_EvictionPolicyConfig_wakeUpIntervalSeconds">5</configValue>
<configValue key="agent_cache_EvictionPolicyConfig_region_maxNodes">1000</configValue>
<configValue key="agent_cache_EvictionPolicyConfig_region_timeToLiveSeconds">0</configValue>
</group>
</module>
说明:
enable:集群开关。单机为false(流程实例池使用单机不通知模式,代理使用ConcurrentHashMap模式,通知使无效功能关闭);集群为true(流程实例池和代理Cache使用JBossCache的同步通知使无效模式,通知使无效功能开启)
“通知使无效”功能主要实现在集群环境下逐出各节点缓存内指定的流程实例或清空整个缓存。
cluster_bind_addr:集群环境下,集群节点绑定的IP地址(即本机IP地址)
invalid_cluster_name:集群环境下,Cluster名称,集群环境内的各节点,只要名称相同时才会进行通知。
instance_pool_cluster_bind_port:集群环境下,集群节点绑定IP地址对应的端口号,任意4位整数,不可以有冲突。
二、流程实例池配置文件instance_pool_service.xml
TransactionManagerLookupClass为工作流流程实例池事务参数。用户不需要修改该参数值,EOS安装程序会自动识别单机和集群环境。单机环境下,使用org.jboss.cache.DummyTransactionManagerLookup;集群环境下(目前只支持WebLogic和WebSphere集群)使用org.jboss.cache.JBossTransactionManagerLookup
三、通用Cache配置文件cache_config.xml
该文件仅供用户自己添加自定义Cache的配置文件,EOS Studio安装时默认没有内容。文件格式需要严格按照以下示例:
<CacheInstance name="common_cache_sample">
<provider>com.primeton.common.cache.JBossCacheProvider</provider>
<configuration>
<property name="clusterName">COMMON_CACHE_CLUSTER</property>
<property name="IsolationLevel">REPEATABLE_READ</property>
<property name="CacheMode">INVALIDATION_SYNC</property>
<property name="InitialStateRetrievalTimeout">20000</property>
<property name="SyncReplTimeout">15000</property>
<property name="LockAcquisitionTimeout">10000</property>
<property name="EvictionPolicyClass">org.jboss.cache.eviction.LRUPolicy</property>
<property name="EvictionPolicyConfig"><config><attribute name="wakeUpIntervalSeconds">5</attribute><region name="/_default_"><attribute name="maxNodes">1000</attribute><attribute name="timeToLiveSeconds">0</attribute></region></config></property>
<property name="jgroupsStacks"><config><UDP mcast_addr="228.1.2.5" bind_addr="192.168.0.175" bind_port="2590" mcast_port="45588" ip_ttl="64" ip_mcast="true" mcast_send_buf_size="150000" mcast_recv_buf_size="80000" ucast_send_buf_size="150000" ucast_recv_buf_size="80000" loopback="true"/><PING timeout="2000" num_initial_members="3" up_thread="false" down_thread="false"/><MERGE2 min_interval="10000" max_interval="20000"/><FD shun="true" up_thread="true" down_thread="true"/><VERIFY_SUSPECT timeout="1500" up_thread="false" down_thread="false"/><pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800" up_thread="false" down_thread="false"/><pbcast.STABLE desired_avg_gossip="20000" up_thread="false" down_thread="false"/><UNICAST timeout="600,1200,2400" window_size="100" min_threshold="10" down_thread="false"/><FRAG frag_size="8192" down_thread="false" up_thread="false"/><pbcast.GMS join_timeout="5000" join_retry_timeout="2000" shun="true" print_local_addr="true"/><pbcast.STATE_TRANSFER up_thread="false" down_thread="false"/></config></property>
</configuration>
</CacheInstance>
说明:
CacheInstance:Cache的名称,可以任意起,但不可以有重复。注意: agent_cache_from、agent_cache_to、TestCluster为系统保留Cache名称,名称不可以雷同
clusterName:集群环境下的Cluster名称,名称相同时才会进行通知。注意:Cluster名称不可以与wfconfig.xml中设定的工作流相关集群名称雷同
CacheMode:单机环境为“LOCAL”,不通知模式;集群环境为“INVALIDATION_SYNC”,同步通知使无效模式
bind_port:集群环境下,节点的绑定IP地址和对应端口(4位整数)。注意:此处用户自定义Cache的端口号不可以与工作流内置Cache的端口号有冲突,否则会影响系统正常运行
【备注】
关于配置文件的详细描述建议参考如下文档中的《附录A 配置文件说明》
ftp://211.152.33.58/EOS5.3/Primeton EOS 5_3产品安装指南.pdf |