FlyingZC commented on issue #21156:
URL:
https://github.com/apache/shardingsphere/issues/21156#issuecomment-1260299447
The `Configuration.removeResource(resName)` method only removes the resource
and does not close the resource,maybe you can refer to the logic of this method
`com.atomikos.icatch.config.Configuration#removeAndCloseResources`
1.remove the resouce by resource name and return the resource object you
want,`Configuration.removeResource ( res.getName () )`;
2.close the resource
```java
private static void removeAndCloseResources(boolean force) {
Collection<RecoverableResource> resources = Configuration.getResources();
for (RecoverableResource res : resources) {
Configuration.removeResource ( res.getName () );
try {
res.close ();
} catch ( ResourceException re ) {
// ...
}
}
}
```
--
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]