[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4624?page=c...
]
Dieter Freismuth commented on HHH-4624:
---------------------------------------
IHMO the call afterTransaction() within JDBCContext.afterNontransactionalQuery(boolean
success) causes the problem and should be called for this case only if run within a
transaction (isAutocommit mode was false in our scenario)!
QueryImpl.list() closes connection
----------------------------------
Key: HHH-4624
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4624
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.3.2
Environment: linux,
postgres 8.3 (same on oracle 11g, mssql 2005 and mysql)
Reporter: Dieter Freismuth
Priority: Critical
Original Estimate: 5 minutes
Remaining Estimate: 5 minutes
if an outer query.iterate() calls within an iteration step a query.list() the connection
is closed and the next outer iteration step causes:
org.hibernate.exception.JDBCConnectionException: could not get next iterator result
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:97)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52)
at org.hibernate.impl.IteratorImpl.next(IteratorImpl.java:156)
the exception is only thrown if there is no transaction!
(works fine if done within an transaction)
call hierarchy:
QueryImpl.list()
-> SessionImpl.list(String query, QueryParameters queryParameters)
-> afterOperation(success); // within finally block
-> JDBCContext.afterNontransactionalQuery( success )
-> ConnectionManager.afterTransaction()
-> ConnectionManager.aggressiveRelease() // within if ( isAfterTransactionRelease() )
{
-> ConnectionManager.closeConnection()
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira