This content has been marked as final. Show 6 replies
Is there something you can do for the architecture of the application,
so it doesn't do that?
The quickest way to handle this is to configure the WebLogic DataSource
with a query timeout value. Every statement made from a WLS datasource
connection will become subject to that (via the Statement.setQueryTimeout()
call). If a statement goes over the limit, it should stop and throw an exception,
which will usually result in ending the transaction.
Thank's ... But
We tried to set the statement timeout, but it seems it's a timeout for the execution of the query ... not for the fetching of the results.
We also tried to set oracle.jdbc.readtimeout=50000 but this timeout occurs only if there's no data transfered through the socket during 50s.
Our problem is that there are data transfered through the socket, millions of records ... we want to break this processing when it spend more of 50s for example ...
Abandon timeout will not help. That is only used if a database crashes during the second phase of commit. It specifies how long the transaction manager should keep trying to complete the transaction.
JTA timeout will only work if you are using XA datasources and two-phase commit transactions. When the timeout occurs, it guarantees that the transaction cannot be committed. Eventually, all of the participant resources will be notified and will not allow any more work to take place on the transaction. It does not stop the threads and the application must be written to handle exceptions appropriately.
Edited by: Steve Felts on Apr 17, 2013 8:32 AM