PostgisDataStore does not close connection pool on disposal
-----------------------------------------------------------
Key: GEOT-950
URL: http://jira.codehaus.org/browse/GEOT-950
Project: GeoTools
Issue Type: Bug
Components: data jdbc, data postgis
Affects Versions: 2.2.0
Reporter: Cory Horner
Fix For: 2.2.1, 2.3
This issue is easily reproducable by running any online test in the postgis
plugin, although it likely occurs for all JDBC2 datastores as well.
When a testcase or geotools-based application which includes postgis support
shuts down, the connection pool is not properly closed; as a result, the
connection is dropped by the JVM. Postgres does not like this at all -- its
log file shows:
"could not receive data from client: Connection reset by peer
unexpected EOF on client connection"
Adding "datastore.getConnectionPool().close()" to the testcase tearDown method
eliminates this problem.
Datastores should have a dispose method (or similar) which would allow us to
close the connection properly and not wreak havok on the database. The
finalize() method is a candidate, but it does not seem to be executed.
--
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
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel