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

Jeffrey Bennett (JIRA) noreply at atlassian.com
Fri Oct 27 11:21:05 EDT 2006


JDBCTransaction.isActive() should report false if jdbcContext.connection().isClosed()
-------------------------------------------------------------------------------------

         Key: HHH-2190
         URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2190
     Project: Hibernate3
        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