[Geoserver-devel] [jira] Created: (GEOS-3066) Removing a DataStore from the catalog does not call DataAccess.dispose()

Removing a DataStore from the catalog does not call DataAccess.dispose()
------------------------------------------------------------------------

                 Key: GEOS-3066
                 URL: http://jira.codehaus.org/browse/GEOS-3066
             Project: GeoServer
          Issue Type: Bug
          Components: Wicket UI
            Reporter: Gabriel Roldán
            Assignee: Justin Deoliveira
            Priority: Blocker
             Fix For: 2.0-beta1

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:
{code}
### 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() );
     }
     
     /**
{code}

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira