How to configure a JDBC Query Timeout for PostgreSQL?

Solution Unverified - Updated -


  • I would like to configure the query timeout for PostgreSQL. How do I configure the timeout?
  • I tried the following setting to the datasource configuration in JBoss EAP but it does not work.

  • I saw the following Exception when I called Statement.setQueryTimeout(int):

    org.postgresql.util.PSQLException: Method org.postgresql.jdbc4.Jdbc4PreparedStatement.setQueryTimeout(int) is not yet implemented.


  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 4.x
    • 5.x
    • 6.x
  • PostgreSQL JDBC Driver
    • 8.x
    • 9.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In