db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6094) Derby ignores DriverManager.setLoginTimeout()
Date Sun, 10 Mar 2013 06:27:12 GMT

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

Dag H. Wanvik commented on DERBY-6094:
--------------------------------------

Currently, when Derby sees an interrupt, it does one of two things: a) if it is at a reasonable
point to stop execution, e.g. waiting for a lock, or between statements in a batch, it will
return control to the user with an exception b) if it is not in such a point of execution,
it will make a note, but proceed, but possibly throw later, cf. point a).  In both cases the
interrupt flag remains set when the user regains control (i.e the JDBC call returns).

I think in a login situation, we would only want to stop execution of the login if it is safe
(as in in we wouldn't lose resources or cause internal inconsistencies). I see you use the
Future class to carry out the login using an upper time bound corresponding to the login timeout.
I don't know how the execution of the asynchronous task would be stopped in such a case. Would
it be safe (necessarily)?

If the Future#get method throws an interrupt exception, we could retry but with a shorter
timeout, I guess (after noting and clearing the flag as per our common approach). Since we
already have a mechanism for stopping if login takes too long I don't see the need for having
interrupts as a mechanism to stop it.

                
> Derby ignores DriverManager.setLoginTimeout()
> ---------------------------------------------
>
>                 Key: DERBY-6094
>                 URL: https://issues.apache.org/jira/browse/DERBY-6094
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.10.0.0
>            Reporter: Rick Hillegas
>         Attachments: derby-6094-01-ac-enforceDriverManagerLoginTimeout.diff, derby-6094-01-ad-enforceDriverManagerLoginTimeout.diff,
derby-6094-01-ae-enforceDriverManagerLoginTimeout.diff, LoginTimeoutTest.java, LoginTimeoutTest.java,
LoginTimeoutTest.java, LoginTimeoutTest.java
>
>
> If you set a login timeout using the DriverManager, Derby ignores the setting. I will
attach a test case which shows this.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message