WSO2 API Manager - Setting #39;CacheId#39; when clustering with SQL Server(WSO2 API 管理器 - 在使用 SQL Server 进行群集时设置“CacheId)
问题描述
我正在按照本指南在三台服务器(网关 + 发布者/存储 + 密钥存储)上对 WSO2 API Manager (v1.10.0) 进行集群:https://docs.wso2.com/display/CLUSTER44x/Clustering+API+管理器+1.10.0
我正在执行安装和配置数据库"部分的第 11a 步.这说明了以下内容:<块引用>
- 要授予 Publisher 和 Store 组件访问注册表数据库的权限,请打开这两个组件中的/repository/conf/registry.xml 文件并进行如下配置:
一个.在 Publisher 组件的 registry.xml 文件中,添加或修改 <dbConfig name="govregistry">
元素的 dataSource
属性,如下所示:
<dbConfig name="govregistry"><dataSource>jdbc/WSO2REG_DB</dataSource></dbConfig><remoteInstance url="https://publisher.apim-wso2.com"><id>政府</id><cacheId>user@jdbc:mysql://regdb.mysql-wso2.com:3306/regdb</cacheId><dbConfig>govregistry</dbConfig><readOnly>false</readOnly><enableCache>true</enableCache><registryRoot>/</registryRoot></远程实例><mount path="/_system/governance" overwrite="true"><instanceId>gov</instanceId><targetPath>/_system/governance</targetPath></mount><mount path="/_system/config" overwrite="true"><instanceId>gov</instanceId><targetPath>/_system/config</targetPath></mount>
但是,我使用的是 Microsoft SQL Server,而不是 MySQL,所以 cacheId
值对我来说并不合适.
请问SQL Server的cacheId
应该如何配置?
我查看了 registry.xml 文件中被注释掉的描述,但无法弄清楚.
这是我的 WSO2REG_DB 配置:
<name>WSO2REG_DB</name><description>注册表使用的数据源</description><jndiConfig><name>jdbc/WSO2REG_DB</name></jndiConfig><定义类型="RDBMS"><配置><url>jdbc:sqlserver://***SERVER***:1433;databaseName=***DATABASE_NAME***</url><用户名>WS02RegUser</用户名><密码>***已删除***</密码><defaultAutoCommit>false</defaultAutoCommit><driverClassName>com.microsoft.sqlserver.jdbc.SQLServerDriver</driverClassName><maxActive>50</maxActive><maxWait>60000</maxWait><testOnBorrow>true</testOnBorrow><validationQuery>SELECT 1</validationQuery><validationInterval>30000</validationInterval></配置></定义></数据源>
cacheId - 这是远程实例的缓存 ID.这里是缓存id 格式应为 $database_username@$database_url,其中$database_username 是远程实例数据库的用户名,并且$database_url 是远程实例数据库 URL.
参考:https://docs.wso2.com/display/Governance460/Remote+Instance+and+Mount+Configuration+Details#RemoteInstanceandMountConfigurationDetails-JDBC-basedRemoteInstanceConfiguration
I'm clustering WSO2 API Manager (v1.10.0) across three servers (Gateway + Publisher/Store + Key Store) by following this guide: https://docs.wso2.com/display/CLUSTER44x/Clustering+API+Manager+1.10.0
I am on Step 11a of the 'Installing and configuring the databases' section. This states the following:
- To give the Publisher and Store components access to the registry database, open the /repository/conf/registry.xml file in each of these two components and configure them as follows:
a. In the Publisher component's registry.xml file, add or modify the
dataSource
attribute of the<dbConfig name="govregistry">
element as follows:
<dbConfig name="govregistry">
<dataSource>jdbc/WSO2REG_DB</dataSource>
</dbConfig>
<remoteInstance url="https://publisher.apim-wso2.com">
<id>gov</id>
<cacheId>user@jdbc:mysql://regdb.mysql-wso2.com:3306/regdb</cacheId>
<dbConfig>govregistry</dbConfig>
<readOnly>false</readOnly>
<enableCache>true</enableCache>
<registryRoot>/</registryRoot>
</remoteInstance>
<mount path="/_system/governance" overwrite="true">
<instanceId>gov</instanceId>
<targetPath>/_system/governance</targetPath>
</mount>
<mount path="/_system/config" overwrite="true">
<instanceId>gov</instanceId>
<targetPath>/_system/config</targetPath>
</mount>
However, I'm using Microsoft SQL Server, rather than MySQL, so the cacheId
value doesn't look right to me.
How should the cacheId
be configured for SQL Server please?
I have taken a look through the commented-out descriptions in the registry.xml file, but cannot figure this out.
Here is my WSO2REG_DB configuration:
<datasource>
<name>WSO2REG_DB</name>
<description>The datasource used by the registry</description>
<jndiConfig>
<name>jdbc/WSO2REG_DB</name>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<url>jdbc:sqlserver://***SERVER***:1433;databaseName=***DATABASE_NAME***</url>
<username>WS02RegUser</username>
<password>***REMOVED***</password>
<defaultAutoCommit>false</defaultAutoCommit>
<driverClassName>com.microsoft.sqlserver.jdbc.SQLServerDriver</driverClassName>
<maxActive>50</maxActive>
<maxWait>60000</maxWait>
<testOnBorrow>true</testOnBorrow>
<validationQuery>SELECT 1</validationQuery>
<validationInterval>30000</validationInterval>
</configuration>
</definition>
</datasource>
cacheId - This is the cache id of the remote instance. Here the cache id should be in the format of $database_username@$database_url, where $database_username is the username of the remote instance database and $database_url is the remote instance database URL.
Reference: https://docs.wso2.com/display/Governance460/Remote+Instance+and+Mount+Configuration+Details#RemoteInstanceandMountConfigurationDetails-JDBC-basedRemoteInstanceConfiguration
这篇关于WSO2 API 管理器 - 在使用 SQL Server 进行群集时设置“CacheId"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:WSO2 API 管理器 - 在使用 SQL Server 进行群集时设置“CacheId"
- 更改自动增量起始编号? 2021-01-01
- 如何使用 pip 安装 Python MySQLdb 模块? 2021-01-01
- 使用 Oracle PL/SQL developer 生成测试数据 2021-01-01
- SQL 临时表问题 2022-01-01
- 在SQL中,如何为每个组选择前2行 2021-01-01
- 如何将 Byte[] 插入 SQL Server VARBINARY 列 2021-01-01
- 以一个值为轴心,但将一行上的数据按另一行分组? 2022-01-01
- 如何将 SonarQube 6.7 从 MySQL 迁移到 postgresql 2022-01-01
- 导入具有可变标题的 Excel 文件 2021-01-01
- 远程 mySQL 连接抛出“无法使用旧的不安全身份验证连接到 MySQL 4.1+"来自 XAMPP 的错误 2022-01-01