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());
   ```
   
   
![image](https://user-images.githubusercontent.com/15647179/144033060-53cfc633-fb53-436c-80b6-b4e826abbd71.png)
   
![image](https://user-images.githubusercontent.com/15647179/144033133-cefef7a2-4b36-49ca-86bc-b0e5afcbeacf.png)
   
![image](https://user-images.githubusercontent.com/15647179/144033184-ced25c4f-f2a2-48aa-b736-3d45cba60455.png)
   
![image](https://user-images.githubusercontent.com/15647179/144033271-96e3d0e7-fde7-4238-82fb-e34519ac10cd.png)
   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: xxxxx
     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: xxxxx
     poolName: null
   
   ````
   
   db2-Datasource :
   Omitted, basically consistent with the above
   
   When progarm restart,here will load all of the datasource of 
metadata(`StandaloneContextManagerBuilder`)
   
![image](https://user-images.githubusercontent.com/15647179/144033812-508ae24b-2e49-425c-ab1d-cebdcfe20ea1.png)
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to