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

Rick Hillegas updated DERBY-6970:
---------------------------------
    Attachment: DERBY_6970.java

The Derby DataSource implementations conform to the JDBC standard. The default 
login timeout is 0 (wait forever) as specified by the javadoc for 
javax.sql.CommonDataSource.setLoginTimeout(). Some other logic in your 
application stack is forcing the timeout to be 5 seconds.

I am attaching a revised version of the test program, which demonstrates that 
Derby is behaving correctly. I instrumented the Derby engine to wait 20 seconds 
before returning a connection. Then I ran the test program. Here is the output 
from the program:


Leaving login timeout untouched.
    Successfully got connection...after 20 seconds.

Setting login timeout to 5 seconds.
    Login timeout exceeded....after 5 seconds.

Setting login timeout to 10 seconds.
    Login timeout exceeded....after 10 seconds.

Setting login timeout to 20 seconds.
    Login timeout exceeded....after 20 seconds.

Setting login timeout to 30 seconds.
    Successfully got connection...after 20 seconds.

Setting login timeout to 0 seconds.
    Successfully got connection...after 20 seconds.

I tried this experiment using Derby jar files built from the head of the 
development trunk. This code has not changed for several releases.

> No support for setting connection timeout for a connection
> ----------------------------------------------------------
>
>                 Key: DERBY-6970
>                 URL: https://issues.apache.org/jira/browse/DERBY-6970
>             Project: Derby
>          Issue Type: Improvement
>          Components: JDBC
>    Affects Versions: 10.13.1.1
>         Environment: Linux Operating system Resin App server
>            Reporter: Satyabrata Mohanty
>         Attachments: DERBY_6970.java, DERBY_6970.java
>
>
> https://stackoverflow.com/questions/44722659/providing-connection-time-out-in-derby-client-driver
> This is the link where i have put the details of my requirement. Basically my 
> question is, how we can provide a timeout to connection, if connection object 
> not established within that specific time it must get out from infinite 
> waiting and resulting any exception or null, but seems to be there is no such 
> functionality in derby till now. Request you to kindly look-into this and 
> provide your inputs like if there is a way to achieve this then mention it 
> with clear steps  or else if its not implemented then when we can get this 
> must have required feature in derby. Its really affecting our performance 
> request you to kindly respond quickly.
> Thanks!



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to