[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4624) QueryImpl.list() closes connection
Dieter Freismuth (JIRA)
noreply at atlassian.com
Mon Nov 30 08:01:09 EST 2009
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=34806#action_34806 ]
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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list