I am trying to timeout a query if my network connection should suddenly drop during the query. My client is a web service layer that is being used by a web UI, so a long delay waiting for the network connection to return is unacceptable (I should note for this scenario that the web UI and the web service layer happen to be on the same machine, and the network connection is broken somewhere between that machine and my db).
I've tried setting all different sorts of timeout properties (hibernate.timeout, hibernate.connection.timeout, hibernate.c3p0.timeout, etc), but it never seems to actually time out. It could be retrying the query on each connection in the connection pool, but it seems like there should be a way to actually time out the whole thing if I don't get a response to the query within a certain time period. I've also tried putting timeouts on the transaction and the query to no avail. My database is an oracle 10 db and I'm using the ojdbc14 driver that oracle provides. If anyone can provide any insight into what I might be missing, that would be great.
Thanks! -jp
|