Query timeout is not supported in JDBC (driver version 9.1-901.jdbc4)
Statement.setQueryTimeout(int seconds) throws an exception when seconds > 0.
(in drivers prior to 8.3 there was no error but it was ignored)

Using Java + transaction management, we are missing this feature badly.
I found people trying to fallback using "SELECT statement_timeout(SEC)".
But this is useless in many cases (I mean transaction manager does it's
work independently) :
- my code do not directly decides to start a transaction
- some code may have different transaction settings
So I couldn't easily introduce the good select statement at the right
moment.

Even if the behaviour is not implemented, I guess it could be "mocked" if
the call to Statement.setQueryTimeout(int seconds) generated the select
statement "SELECT statement_timeout(SEC)".
I know this is not ideal but could solve the problem temporarily.
I could even be turned on by some driver settings.

-- 
Sylvain Mougenot

Reply via email to