2012-10-10 67 views
0

我想执行查询超时。应用程序框架包括:Spring MVC和hibernate使用Postgres查询执行超时8.4

如果我指定的会话工厂超时。它给出的错误超时是没有在Postgresql驱动程序中实现。

我使用Postgres的8.4

代码是:

@Override 
@Transactional(timeout=20) 
public List<MasterBooking> searchMasterBookings(---){//some more code} 

错误堆栈跟踪:

SQL state [0A000]; error code [0];Method org.postgresql.jdbc4.Jdbc4PreparedStatement.setQueryTimeout(int) is not yet implemented.; nested exception is org.postgresql.util.PSQLException: Method org.postgresql.jdbc4.Jdbc4PreparedStatement.setQueryTimeout(int) is not yet implemented. 

我如何能实现呢?

+0

我猜有些代码/文件片段会有所帮助。 –

回答