1 Reply Latest reply on Mar 2, 2008 11:41 AM by Jonathan Halliday

    Question about Transaction Timeout

    Yuval Ryaboy Newbie

      Hi,

      My questions are regarding Transaction Timeout parameter.

      Assuming I have CMT EJB marked as "Required" (or "RequiresNew") with one function "my_method".

      1. When does Transaction "clock" start to work, the moment I enter the "my_method" function or on the first "update" action (assuming I update the DB)?

      2. If "my_method" performs only several very heavy "load" actions from DB that take more the Transaction Timeout, will I get a timeout?


      I am using JBoss 4.2.2GA and Oracle 10G DB.


      Thanks,
      Yuval

        • 1. Re: Question about Transaction Timeout
          Jonathan Halliday Master

          1. From the time the method is entered, not the first time it hits the db.

          2. It depends. Timeouts are not always processed immediately, partly due to configuration and partly due to threading issues in some db drivers. When they are processed it's by a background thread, so your business logic does not get an interrupt, just a rollback exception when it eventually tries to commit. Thus you may not actually notice the timeout if you are only reading the db, unless the read encompasses uncommitted data. As if that was not complicated enough, a bug in the current version of the app server can cause a connection to remain valid across a transaction boundary, undetectably to the application code. Tread carefully.