【问题标题】:Oracle Coherence Cache ClusteringOracle Coherence 缓存集群
【发布时间】:2018-06-29 10:06:13
【问题描述】:

我们有两个 Web 应用程序使用两个不同版本的 Embedded Coherence Cache:

  • 带有 Coherence 3.7.1 的应用程序 1(在带有 Weblogic Server 12.1.2 的 JDK7 环境中运行)
  • 使用 Coherence 12.2.1 的应用程序 2(使用 Weblogic Server 12.2.1 在 JDK8 环境中运行)

每个应用程序部署在不同的 weblogic 服务器上。我们尝试使用 tangosol-override.xml 配置此应用程序的集群缓存:

应用程序 1 配置:

<?xml version='1.0'?>
<coherence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns="http://xmlns.oracle.com/coherence/coherence-operational-config"
   xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-operational-config coherence-operational-config.xsd">
   <cluster-config>
      <unicast-listener>
            <well-known-addresses>
                <socket-address id="1">
                    <address>10.7.17.31</address>
                    <port>8088</port>
                </socket-address>
                <socket-address id="2">
                    <address>10.7.17.31</address>
                    <port>9099</port>
                </socket-address>
            </well-known-addresses>
            <address system-property="tangosol.coherence.localhost">localhost</address>
            <port system-property="tangosol.coherence.localport">8088</port>
            <port-auto-adjust system-property="tangosol.coherence.localport.adjust">true</port-auto-adjust>
      </unicast-listener>    
   </cluster-config>
  <license-config>
    <edition-name system-property="tangosol.coherence.edition">GE</edition-name>
    <license-mode system-property="tangosol.coherence.mode">prod</license-mode>
  </license-config>
</coherence>

应用程序 2 配置:

<?xml version='1.0'?>
<coherence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns="http://xmlns.oracle.com/coherence/coherence-operational-config"
   xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-operational-config coherence-operational-config.xsd">
   <cluster-config>
      <unicast-listener>
            <well-known-addresses>
                <socket-address id="1">
                    <address>10.7.17.31</address>
                    <port>8088</port>
                </socket-address>
                <socket-address id="2">
                    <address>10.7.17.31</address>
                    <port>9099</port>
                </socket-address>
            </well-known-addresses>
            <address system-property="tangosol.coherence.localhost">localhost</address>
            <port system-property="tangosol.coherence.localport">9099</port>
            <port-auto-adjust system-property="tangosol.coherence.localport.adjust">true</port-auto-adjust>
      </unicast-listener>    
   </cluster-config>
  <license-config>
    <edition-name system-property="tangosol.coherence.edition">GE</edition-name>
    <license-mode system-property="tangosol.coherence.mode">prod</license-mode>
  </license-config>
</coherence>

但其他应用程序无法访问所有缓存。 有什么问题?

【问题讨论】:

  • 我还将以下参数添加到 Weblogic 启动脚本的 JAVA_OPTIONS:-Dtangosol.coherence.cluster=appclustername -Dtangosol.coherence.clusterport=12001

标签: caching weblogic12c


【解决方案1】:

经过一些研究,以下解决方案对我有用。我在两个 Weblogic 服务器的启动脚本中设置了 tangosol-override.xml,并删除了与一致性缓存相关的其他参数(-Dtangosol.coherence.override=C:\root\tangosol-coherence-override.xml)。

tangosol-coherence-override.xml 配置文件:

<?xml version='1.0'?>
<coherence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns="http://xmlns.oracle.com/coherence/coherence-operational-config"
   xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-operational-config coherence-operational-config.xsd">
   <cluster-config>
      <member-identity>
      <cluster-name>appclustername</cluster-name>
    </member-identity>
    <multicast-listener>
      <address>224.1.1.1</address>
      <port>12345</port>
    </multicast-listener>
   </cluster-config>
  <license-config>
    <edition-name system-property="tangosol.coherence.edition">GE</edition-name>
    <license-mode system-property="tangosol.coherence.mode">prod</license-mode>
  </license-config>
</coherence>

【讨论】:

    猜你喜欢
    • 2015-07-01
    • 2013-06-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多