[hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-2190) JDBCTransaction.isActive() should report false if jdbcContext.connection().isClosed()

Strong Liu (JIRA) noreply at atlassian.com
Mon Jun 7 02:54:25 EDT 2010


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Strong Liu resolved HHH-2190.
-----------------------------

    Resolution: Rejected

> JDBCTransaction.isActive() should report false if jdbcContext.connection().isClosed()
> -------------------------------------------------------------------------------------
>
>                 Key: HHH-2190
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2190
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: core
>            Reporter: Jeffrey Bennett
>
> In error-handling routines, I use Transaction.isActive() to determine if it is 'safe' to perform Transaction.rollback().
> If the Session has previously closed, Transaction.isActive() mis-reports that the transaction is still alive when it is not.
> I'll grant that the JavaDoc for isActive indicates it is the 'local transaction', not the underlying transaction, but since there is no way to delve into the underlying connection in the public API, that is really a cop-out.  If you don't like the idea of modifying the behavior of isActive(), how about exposing a 'public Connection connection()' method that exposes the connection?

-- 
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