Transaction Time out failure


EJB design: Transaction Time out failure

  1. Transaction Time out failure (1 messages)

    My application is a Swing based application using Stateless session beans and CMT.
    On Weblogic 8.1 SP2, Oracle 9i. All DB operations are performed using Stored Procedures.

    The application, has some transaction that may take large amount of time based on the user input.

    I have set the transaction time out to say 30 seconds. Suppose a particular operation takes more than 30 seconds the container must ideally throw a Time-out Exception as soon as the time out occurs. But unfortunately this is not happening. The container is not throwing the TransactionTimeOut Exception. Actually it is behaving inconsistently in this respect. Sometimes the exception is thrown and everything is fine. But most times the Exception is not thrown and the application gets stuck until much beyond the specified time out period.

    I are not able to find what the exact problem is behind this inconsistency.

    When I monitor this transaction using the Admin console. The timeout does occur soon after the specified period. But the transaction is only marked as 'Marked for Rollback'. The rollback does not actually happen until much later. The container is not throwing a TimeOutException on expiry of the time out period.

    please help me to tackle this issue.

    Thanks and Regards,
  2. Transaction Time out failure[ Go to top ]


    Whenever a transaction timeout happens weblogic will set the transaction status as rolledback. But the thread that is executing the user request won't stop immediately. That means the thread will get stuck and the node manager will detect the stuck threads and the runtime environment will throw error. I think this is what is happening in your case.

    The solution to your problem can be to set optimum value transaction timeout so that the transaction is a success.

    Hope it helps.