[ACCEPTED]-How is Oracle's JDBC query timeout implemented?-timeout
According to Oracle JDBC FAQ
Statement timeout thread. This thread is created if you execute any statement with a timeout. Only one thread is created no matter how many statements or connections. This thread lasts the lifetime of the VM.
0
Tanel Poder wrote an article on how a Cancel works 5 through the OCI (Oracle Call Interface). I 4 guess something similar is done for JDBC. If 3 you are using the thick driver, through 2 OCI, you could try tracing the session (through 1 settings sqlnet.ora) and see what gets recorded.
When a query actually timesout when using 6 the setTimeOut method, a SQL exception with 5 the Oracle error code ORA-01013 - user requested cancel of current operation
is thrown from the 4 oracle server.
This would mean that the operation 3 has been cancelled gracefully (as far as oracle is 2 concerned/as much oracle can) - because 1 it is oracle sending this message.
I do know that the query does not continue 7 on the server side when the timeout is reached. There 6 is some intention/signal option sent to 5 the server either before or after the timeout 4 is reached to indicate it the server should 3 stop. I have verified this by looking on 2 the server in various V$ tables to see if 1 the query is running. (V$SESSION, V$SQL, etc)
More Related questions
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.