Issue Type: Bug Bug
Affects Versions: 8.0-RC2
Assignee: Unassigned
Components: jdbc
Created: 05/Jul/12 1:29 AM
Description:

The issue is the featureCollection.accepts( visitor, progress ) method closing the JDBC connection when it is being shared on a transaction. This causes the next use of the featureSource to fail making for a merry debug hunt.

Normal use has:

  • ContentFeatureSource.accepts making use of a JDBCFeatureReader to visit each feature
  • At the end of that JDBCFeatureReader.close()
  • calls JDBCDataStore.releaseConnection, cx, featureSource.getState() )
  • releaseConnection carefully only calls closeSafe( Connection ) if we are on Transaction.AUTO_COMMIT

For JDBCFeatureSource:

  • handleVisitor( query, visitor ) is used
  • This grabbed the connection itself, and passed it to JDBCDataStore.getAggregateValue
  • And the called JDBCDataStore().closeSafe( cx ) on the shared connection

Fixe is to call JDBCDataStore.releaseConnection(cx,getState()) just like JDBCFeatureReader normally does.

Project: GeoTools
Priority: Major Major
Reporter: Jody Garnett
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to