Details
Description
This one I think is critical since it may leave stale connections.
Basically I don't see DataAccess.dispose() being called from anywhere in the UI logic (remove?) nor in the Catalog/ResoucePool. (dispose( DataStoreInfo info ) exists in ResoucePool but didn't find a reference to it)
This patch should do the trick imho, but am not so sure:
### Eclipse Workspace Patch 1.0
#P main
Index: src/main/java/org/geoserver/catalog/ResourcePool.java
===================================================================
--- src/main/java/org/geoserver/catalog/ResourcePool.java (revision 12454)
+++ src/main/java/org/geoserver/catalog/ResourcePool.java (working copy)
@@ -300,7 +301,8 @@
* @param info The data store metadata.
*/
public void clear( DataStoreInfo info ) {
- dataStoreCache.remove( info.getName() );
+ dispose(info);
+ dataStoreCache.remove( info.getId() );
}
/**
As far as I can see the datastore cache is a custom map with a method that will dispose of the datastore when the entry is removed.
See ResourcePool.DataStoreCache.destroyEntry
Is that method not called?