Hi all,

I am trying to understand how to use setTransactionTimeout in conjunction with WmArt’s explicit transaction management.

I created a test rig as follows -

  • (timeoutSeconds = 5)
  • Sequence (try/catch)
    – Sequence (try)
    — Call Oracle stored procedure which sleeps for 10 seconds
    – Sequence (catch)

When I run this I was expecting the Oracle call to be interrupted for taking longer than 5 seconds but what I see is the call completing normally after 10 seconds.

Any suggestions? Have I misunderstood the function of the transaction timeout?




Do you see any information in the logs on why its not getting rolled back? As per documentation your test code seems to be correct.


Thanks for your reply. The original version of my test did not originally include any database changes, just a sleep routine, so there was nothing to commit or roll back.

I subsequently added a database insert to my test and noted that, while the service did not terminate early, the insert was committed if the timeout was not breached and rolled back if the timeout was breached.

Evidently my original assumption (that the service would terminate upon reaching timeout) was incorrect. The transaction is rolling back correctly, however, so this is not a problem.