如何在 Coherence 中使用动态地址和端口值配置单播侦听器地址

How to configure the Unicast listener address with dynamic address and port values in Coherence

我们在 ADF 融合应用程序中使用 Coherence 概念,并使用单播列表器创建集群。 截至目前,在本地 运行 一致性时,我们正在使用 tangosol-coherence-override.xml 文件中的本地系统地址和端口值。

我们如何根据 tangosol-coherence-override.xml 文件中的环境更新地址和端口值。

请就此向我们提出建议。

此致, 约瑟夫

您可以在开发中使用 tangosol-coherence-override-dev.xml 文件,在生产中使用 tangosol-coherence-override-prod.xml 文件。根据Coherence documentation:

  • tangosol-coherence-override-dev.xml – This file overrides operational settings in the tangosol-coherence.xml file when Coherence is started in developer mode. By default, Coherence is started in developer mode and the settings in this file are used. The settings in this file are suitable for development environments. The schema file for this override file and the schema for the operational deployment descriptor are the same.
  • tangosol-coherence-override-prod.xml – This file overrides operational settings in the tangosol-coherence.xml file when Coherence is started in production mode. The settings in this file are suitable for production environments. The schema file for this override file and the schema for the operational deployment descriptor are the same.

如果您需要更大的灵活性(例如,您有单独的开发、集成测试、暂存等环境),您可以使用 tangosol.coherence.override 系统 属性 来指定应该使用的配置文件. Coherence 文档中的第 3.7 and 3.8 章详细解释了这些配置的可能性。