WSO2 API Manager - 在使用SQL Server进行集群时设置“CacheId” [英] WSO2 API Manager - Setting 'CacheId' when clustering with SQL Server
问题描述
我按照以下指南在三个服务器(网关+发布商/商店+密钥存储)上对WSO2 API管理器(v1.10.0)进行集群:
https://docs.wso2.com/display/CLUSTER44x/Clustering+API+Manager+1.10.0
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
我在安装和配置数据库部分的步骤11a。此状态如下:
I am on Step 11a of the 'Installing and configuring the databases' section. This states the following:
- 为发布商和商店组件授予对注册表的访问权限数据库中,打开这两个组件中的/repository/conf/registry.xml文件,并如下配置它们:
在Publisher组件的registry.xml文件中,添加或修改< dbConfig name =govregistry> $ c的
dataSource
属性$ c>元素,如下所示:
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.
cacheId
我已经看过了在registry.xml文件中的注释掉的描述,但不能解决这个问题。
I have taken a look through the commented-out descriptions in the registry.xml file, but cannot figure this out.
这是我的WSO2REG_DB配置:
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 - 远程实例的高速缓存标识。这里缓存
id应该是$ database_username @ $ database_url的格式,其中
$ database_username是远程实例数据库的用户名,
$ database_url是远程实例数据库URL。 / p>
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 Manager - 在使用SQL Server进行集群时设置“CacheId”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!