Forum Stats

  • 3,750,519 Users
  • 2,250,187 Discussions


Commit timeout query - JDBC

user10366531 Member Posts: 199
edited Dec 6, 2013 7:13PM in Generics

Ours is a java based front-ending application. In this, we are using oracle 11g JDBC driver to connect to ORACLE. As per JDBC specification, we are using query timeout parameter to specify the maximum threshold time a thread can be kept waiting for query to finish. But the same is available at query execution level only i.e. on statement object or on preparedstatement object. But we need similar functionality at connection level. To be more precise, any call to ORACLE from JDBC should not take more time than specified limit, otherwise the same calls should be cancelled. E.g. if commit is taking very high time and we don’t want our thread to be kept waiting for commit. In this case, probably on encountering timeout, we may either rollback the transaction or just close the connection,

Is the same is supported anyhow in JDBC or in ORACLE which can be configured from front-ending application?


  • There is a JDBC forum which is more appropriate for this.

    And IMHO a commit call is something that you do NOT want to control a timeout on.  Maybe in gross limits but not small limits.  If I had a commit that was in fact normally taking a long amount of time I would look to the statements being executed in the transactions as being incorrect or too big.  And refactor there.

This discussion has been closed.