Hi,
Under http://rsmogura.net/pgsql/pgsql_jdbc_querytimeout_v2_20091112.tar.bz2 you can find newer version of statement timeout, witch is bettered propsal of solution, but still only from non-batch statements.
Kind regards,Radek Smogura