[
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-2.patch
Thanks Bryan very much!
I have tried following your advice, now, in the new patch, the
MockInternalDriver can be instanced and its connect(String url, Properties
info) is called indeed, however, its super.connect(url, info) throws a
NullException. It seems this way is not OK. I still faced the same
question--how to mock a rollback as expected.
Wish for your comments!
> 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: 10.5.3.0
> Reporter: Aaron Digulla
> Labels: derby_triage10_8
> Attachments: DERBY-4443-1.patch, DERBY-4443-2.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