[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2820) Can not set HOLD_CURSORS_OVER_COMMIT when creating ScrollableResults
jose (JIRA)
noreply at atlassian.com
Wed Aug 20 04:58:40 EDT 2008
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2820?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_30943 ]
jose commented on HHH-2820:
---------------------------
Since Hibernate 3.x the default behaviour for property "hibernate.connection.release_mode" is:
- JTATransactionFactory, this returns ConnectionReleaseMode.AFTER_STATEMENT;
- JDBCTransactionFactory, this returns ConnectionReleaseMode.AFTER_TRANSACTION
note: in my case, every commit release (close) the JDBC Connection => clossing openned ResultSet
But you can set ON_CLOSE (default behaviour for hibernate 2.x): The Hibernate session obatins a connection when it first needs to perform some JDBC access and holds unto that connection until the session is closed.
<property name="hibernate.connection.release_mode">on_close</property>
works fine !!
note: this "temporary" solution change holdability at Connection level (instead of *Statement level)
see: http://www.hibernate.org/hib_docs/v3/reference/en/html_single/#transactions-connection-release for more info
> Can not set HOLD_CURSORS_OVER_COMMIT when creating ScrollableResults
> --------------------------------------------------------------------
>
> Key: HHH-2820
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2820
> Project: Hibernate3
> Issue Type: Improvement
> Components: core
> Affects Versions: 3.2.5
> Environment: N/A
> Reporter: steven
>
> Currently, I can not set HOLD_CURSORS_OVER_COMMIT when creating ScrollableResults. It seams that the method in Query:
> public ScrollableResults scroll(ScrollMode scrollMode) throws HibernateException;
> should be added with the second argument: ResultSet holdability.
--
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