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

Daniel John Debrunner commented on DERBY-3304:
----------------------------------------------

I think that revision 618788 makes this code in resetActivations() unnecessary. 
It was used to force held cursors into non-held state to be closed on 
rollback() in Activation.reset(), since reset() used to check the holdability. 
Your change is good in that it removes this link between two methods that 
should be independent of each other (ie. resetActivations() should not have had 
internal knowledge of what reset() was doing). :-)

                        /*
                        ** andClose true means we are here for rollback.
                        ** In case of rollback, we don't care for holding
                        ** cursors and that's why I am resetting holdability
                        ** to false for all activations just before rollback
                        */      
                        if (andClose)
                                a.setResultSetHoldability(false);


Now (and to some extent before the change) the javadoc for resetActivations() 
is incorrect, in addition the method name is misleading. It would be good to 
clean this up.

> Explicit commit inside a java procedure makes a dynamic result sets passed 
> out unavailable
> ------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3304
>                 URL: https://issues.apache.org/jira/browse/DERBY-3304
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.4.0.0
>            Reporter: Daniel John Debrunner
>            Assignee: Mamta A. Satoor
>         Attachments: Main.java
>
>
> Repro (Main.java) that shows changed behavior after svn 602991
> (the patch committed for this issue). It seems a regression: (originally from 
> Dag H. Wanvik attached to DERBY-1585)
> An explicit commit inside a stored procedure makes a dynamic result sets 
> passed out unavailable, even if the commit is executed *prior* to the result 
> set; as in the repro.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to