I have a query that runs longer than the value specified with oracle.jdbc.ReadTimeout. It fails with an SQLRecoverableException which is all good. Except the query doesn’t can cancelled and the Oracle keeps working on it. Trying to catch that exception and do a cancel on the statement fails because the statement is already closed.
I have a query that runs longer than the value specified with oracle.jdbc.ReadTimeout. It
Share
This was silly. The query timeout should be set with Statement.setQueryTimeout() and then queries will be cancelled properly. Basically setQueryTimeout should always be lower than the oracle.jdbc.ReadTimeout and everyone will be happy.