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.
I see. You can set a JTA transaction timeout, if this is a WebLogic-mediated transaction, and
whatever the application is doing, it will be interrupted and the result set processing should
be halted as well. Do you have any means to alter the JDBC code?
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.