4 Replies Latest reply on May 11, 2005 4:16 AM by Baskar Bharadwaj

    Transaction - time out

    Baskar Bharadwaj Newbie

      Hi,
      I need some help from experienced programmers - who have faced
      this specific problem of 'transaction - timeout'. My GUI application
      accesses my app server - deployed with some of my session & entity beans. There is a certain case - when the processing task for the app server becomes heavy because of the inputs from the GUI, I receive
      the below exception:
      [The cause for this exception was shown as the method call to a method in entity bean - which gets accessed by multiple session beans]
      -----------------------------------------------------------------------------------
      java.lang.RuntimeException: Transaction marked for rollback, possibly a timeout
      at org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.waitForTx(QueuedPessimisticEJBLock.java:366)
      at org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.doSchedule(QueuedPessimisticEJBLock.java:236)
      at org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.schedule(QueuedPessimisticEJBLock.java:183)

      ------------------------------------------------------------------------------------
      These two warnings were also seen just before timing out.

      2005-04-21 17:58:38,593 WARN [org.jboss.tm.TransactionImpl] Transaction TransactionImpl:XidImpl [FormatId=257, GlobalId=baskarbj//995, BranchQual=] timed out. status=STATUS_ACTIVE
      2005-04-21 17:58:38,609 WARN [org.jboss.tm.TransactionImpl] Transaction TransactionImpl:XidImpl [FormatId=257, GlobalId=baskarbj//999, BranchQual=] timed out. status=STATUS_ACTIVE
      ------------------------------------------------------------------------------------

      I mainly wanted to know - if the cause could be a 'dead lock' - that is causing the timing out. If transaction dead locks - can happen, but still not be notified through - an 'ApplicationDeadLockException' ?.
      Please comment

      Thanks in advance...

        • 1. Re: Transaction - time out
          Andy Morris Newbie

          Which version of JBoss are you using?

          • 2. Re: Transaction - time out
            Baskar Bharadwaj Newbie

            Hi !!
            I'am using JBoss 3.2.3 ...

            Regards..

            • 3. Re: Transaction - time out
              Andy Morris Newbie

              I am no expert in this area, but I've experienced a similar problem with our application.

              I have been using JBoss 2.4.3 and not 3.2.3 so my comments may not be applicable but I too have experienced a similar problem where JBoss has not thrown an ApplicationDeadlockException in a situation where I would have expected it to do so.

              You will need to review your use of your entity beans and determine if the default combination of pessimistic locking coupled with commit option A is appropriate for your use case. It would be also worth considering the use of read-only methods in your beans (something not available to me in v2.4.3).

              Regards,

              Andy

              • 4. Re: Transaction - time out
                Baskar Bharadwaj Newbie

                Hi !!
                Can you please provide some more inputs on - determining the suitability of the 'default combination of pessimistic EJB locking & commit option A' for the use-case. An example for analysing would be very helpful for me.

                Few comments:
                1. the default commit option is 'B' & not 'A' - right ??
                2. Read-only methods cannot be used in my case - since, timeout is happening only when i try to reads a modifiable field.[which cannot be made read-only, as concurrent writes are also possible]

                Thanks in advance !!