[ http://issues.apache.org/jira/browse/DERBY-953?page=comments#action_12370794 ]
Kristian Waagan commented on DERBY-953: --------------------------------------- The code snippet posted in the previous comment still has the same problem as the original code, which was the reason why I returned true in the catch block. A NoCurrentConnection exception can be thrown in getConnection(). active would then still not be set to false, and isClosed would throw this exception. I do not like that isClosed can throw an exception in this case, and in this situation I would dare say a NoCurrentConnection is the same as the statement being closed and we could simply return true. So I don't quite see how the new proposal would solve the issue. It would also introduce yet another method for checking the state, taking the number up to three; checkStatus, checkExecStatus and checkActive. If you still want this to happen, give me a little more pushback, I'm not yet convinced I want to do this. I do however see that I could have checked that the exception thrown actually is a NoCurrentConnection exception, and then re-throw the exception if it is not. Would that ease your concerns? > Add miscellaneous Statement methods introduced by JDBC 4 > -------------------------------------------------------- > > Key: DERBY-953 > URL: http://issues.apache.org/jira/browse/DERBY-953 > Project: Derby > Type: New Feature > Components: JDBC > Reporter: Rick Hillegas > Assignee: Kristian Waagan > Fix For: 10.2.0.0 > Attachments: DERBY-953-1a.diff, DERBY-953-1a.stat, DERBY-953-2a.diff > > As described in the JDBC 4 spec, sections 13.1 and 3.1. > This adds support for new Statement methods added by JDBC4 and not addressed > by other JIRAs: isClosed() and getResultSetHoldability(). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
