db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Houx Zhang (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-4443) Wrap rollback in exception handlers in try-catch
Date Thu, 24 Mar 2011 15:55:05 GMT

     [ https://issues.apache.org/jira/browse/DERBY-4443?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Houx Zhang updated DERBY-4443:

    Attachment: DERBY-4443-3.patch

Oh, good message, Bryan! Thanks to your patient advice, I think we have get closer to the

I have remove the lines 

    dvr.boot(false, null); 
, yes the test can run further, but the MockInternalDriver.connect() is not called nay more.

If keep the "dvr.boot(false, null); ", we get what we want just like in patch-3, the MockConnection
is created and rollBack() failed as expected.

I have sumbitted the DERBY-4443-3.patch. Please check it. If it's OK, I will add more test
cases, clean code and give a final version.

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