db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Pendleton (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-4443) Wrap rollback in exception handlers in try-catch
Date Sat, 26 Mar 2011 15:44:05 GMT

    [ https://issues.apache.org/jira/browse/DERBY-4443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13011647#comment-13011647

Bryan Pendleton commented on DERBY-4443:

This latest patch is looking pretty good to me: the code changes look clear and
straightforward, the test looks clear and to-the-point. The test passes for me
with the patch applied; it also fails as I expect when the code change to
SystemProjects.java is reverted, so the test seems to be testing the change

Aaron, you mentioned in the original issue description that we might need to
make this change in multiple places in Derby; are you aware of any places
besides SystemProcedures.java where we issue unprotected rollback()
calls like this?

I suppose I'm trying to figure out whether this patch would resolve this issue
completely, or whether it is a partial solution, and we will need to make
similar changes in subsequent patches.

> Wrap rollback in exception handlers in try-catch
> ------------------------------------------------
>                 Key: DERBY-4443
>                 URL: https://issues.apache.org/jira/browse/DERBY-4443
>             Project: Derby
>          Issue Type: Bug
>          Components: Demos/Scripts, Documentation, Eclipse Plug-in, JDBC, Network Client,
Network Server, Replication, Services, SQL, Test, Tools
>    Affects Versions:
>            Reporter: Aaron Digulla
>              Labels: derby_triage10_8
>         Attachments: DERBY-4443-1.patch, DERBY-4443-2.patch, DERBY-4443-3.patch, DERBY-4443-4.patch,
> Avoid this pattern everywhere:
> 		}catch(SQLException se){
> 			//issue a rollback on any errors
> 			conn.rollback();
> 			throw  se;
> 		}
> because an error in rollback will shadow the original exception.

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message