db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <fisc...@seitenbau.net>
Subject Antwort: Timeout for a Torque call
Date Tue, 19 Feb 2008 15:44:13 GMT

"Tobias Hilka" <thilka@vps.de> schrieb am 19.02.2008 15:34:40:

> Hello,
>
> is there any possibility within Torque to define some kind of timeout for
a
> single Torque action like saving a record to database?
>
> We have the problem that we want to interrupt a call to a database which
> sometimes does not respond within a reasonable time.
>
> Any ideas on this?

None that I know of within Torque. I can think of two possibilities:
1) maybe the jdbc driver for the particular database you are using is
offering such a feature
2) You can create a new thread and do the save() in the new thread.
However, this brings additional problems such as
  - To be sure that the save is not completed if you run into the timeout
you must add some transaction-handling code
  - the code must be thread-safe

      Thomas


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message