You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/11/30 10:56:22 UTC
[GitHub] [shardingsphere] zt9788 edited a comment on issue #13830: When create mutil datasource and Use Mode Standalone that will be load twice pool
zt9788 edited a comment on issue #13830:
URL: https://github.com/apache/shardingsphere/issues/13830#issuecomment-982518384
@zjcnb
I just saw your reply .
```
k=name
mode = ModeConfiguration(file,standalone)
v=(master,slave)
rules=(new ShardingRuleConfigurationYamlSwapper()).swapToObject(YamlReadwriteSplittingRuleConfiguration[from yml])
ShardingSphereDataSource shardingSphereDataSource =
(ShardingSphereDataSource) ShardingSphereDataSourceFactory.createDataSource(
k, mode, v, rules, shardingProps.getProps());
```




dbA-dataSources:
```
xxxxx-master:
schema: null
transactionIsolation: null
exceptionOverrideClassName: null
initializationFailTimeout: 1
validationTimeout: 5000
catalog: null
maxLifetime: 30000
leakDetectionThreshold: 0
connectionInitSql: null
minimumIdle: 2
keepaliveTime: 0
password: xxxxxx
dataSourceJNDI: null
connectionTestQuery: null
idleTimeout: 60000
driverClassName: com.mysql.cj.jdbc.Driver
jdbcUrl: xxxxxxxxxxx
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
maximumPoolSize: 100
connectionTimeout: 60000
username: hq_db
poolName: null
xxxxxx-slave1:
schema: null
transactionIsolation: null
exceptionOverrideClassName: null
initializationFailTimeout: 1
validationTimeout: 5000
catalog: null
maxLifetime: 30000
leakDetectionThreshold: 0
connectionInitSql: null
minimumIdle: 2
keepaliveTime: 0
password: xxxxxxxxx
dataSourceJNDI: null
connectionTestQuery: null
idleTimeout: 60000
driverClassName: com.mysql.cj.jdbc.Driver
jdbcUrl: xxxxxxxxxxxx
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
maximumPoolSize: 100
connectionTimeout: 60000
username: hq_db
poolName: null
````
db2-Datasource :
Omitted, basically consistent with the above
When progarm restart,here will load all of the datasource of metadata(`StandaloneContextManagerBuilder`)

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org