transaction timeout

Discussions

EJB programming & troubleshooting: transaction timeout

  1. transaction timeout (2 messages)

    I have a stateless session bean on JBoss,I set transaction as "required".when it call a big stored procedure on database,I got warning:

    11:24:00,120 WARN [TransactionImpl] Transaction TransactionImpl:XidImpl
    [Format
    Id=257, GlobalId=penpc09//1665, BranchQual=] timed out. status=STATUS_ACTIVE

    how can I control the transaction timeout?
  2. Go to jboss-3.0.3\server\default\conf\jboss-service.xml
    and search the tag
    <attribute name="TransactionTimeout">300</attribute>
    then change the value 300 for what ever you want.
    300 = 5 minutes

    Good luck
  3. Anyway, it is a bad idea to have a transaction that long. Most DBAs will set timeout thresholds on the database that will, of course, ignore whatever settings you do in JBoss.

    You should try another approach to your problem. If you are doing a long update, perhaps you could do it from a simple stand-alone batch application. If you really need to run it inside the application server, maybe you could split the work in smaller pieces (each one of these could be transactional).

    Remember that even if you'd like the whole execution (one big huge update to thousands of lines) to go in a single transaction it might be simply impossible - mostly because of DB restrictions.