From: <leg...@at...> - 2003-09-24 18:52:55
|
The following comment has been added to this issue: Author: John Kristian Created: Wed, 24 Sep 2003 1:52 PM Body: This patch would also fix HB-337, I imagine. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-360 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-360 Summary: WebLogic DataSource doesn't permit conn.getWarnings after commit Type: Patch Status: Unassigned Priority: Major Project: Hibernate2 Components: core Versions: 2.0.2 Assignee: Reporter: John Kristian Created: Wed, 24 Sep 2003 1:49 PM Updated: Wed, 24 Sep 2003 1:49 PM Environment: WebLogic 7, Windows 2000, Microsoft SQL Server Description: SessionFactoryImpl.closeConnection fails to close the JDBC conection, because an exception propagates from conn.getWarnings, because the connection is already closed (as a side-effect of commiting the JTA transaction, I suppose). This patch solves the problem: ==== src/net/sf/hibernate/impl/SessionFactoryImpl.java ==== @@ -403,6 +403,11 @@ try { JDBCExceptionReporter.logWarnings( conn.getWarnings() ); conn.clearWarnings(); + } + catch (SQLException sqle) { + log.warn("Cannot log warnings: " + sqle.getMessage()); + } + try { connections.closeConnection(conn); } catch (SQLException sqle) { --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |