Guido Fiala wrote:
> //user1:
>
> stmt.setQueryTimeout(1);//wait just one second
> ResultSet rs=stmt.executeQuery("BEGIN;SELECT * FROM mytable FOR UPDATE OF
> mytable");
[...]
> What am i doing wrong?
You are assuming that setQueryTimeout() is implemented :) Calling it
does nothing in the current driver. This is on my list of things to fix,
but not near the top.
On another note, it's generally a bad idea to use the transaction
control primitives (BEGIN, COMMIT, ROLLBACK) directly -- use
Connection.setAutoCommit(false) and Connection.commit() /
Connection.rollback() instead.
-O