2012-10-10 66 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

我猜有些代碼/文件片段會有所幫助。 –

回答