I am working in Multi Tenant Spring Boot application. I am using the concept of one DB per Tenant approach. I have configured the dynamic database creation and connection. Also those database configurations are stored in a Map. Now I would like to implement an approach to clear DataSource which is idle for long time?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
I assume, you create Datasource and attempt to store them in a map,
whilst you create DS. you can mention
basicDataSource.setMinIdle(multitenantConnectionPoolConfig.getMinIdle());
So the connection pools ensure only active connections exist in the pool after the min Idle time expires.