Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-1607

Absence of optional 'transaction-timeout' element throws NumberFormatException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • JBossAS-4.0.1 Final
    • None
    • None

      When the optional element <transaction-timeout> is not set in the jboss.xml, a (debug) message is logged with the text "Ignoring transaction-timeout 'null'" - stange message for an optional element that is not there .
      What is even worse is that a stacktrace is printed of the NumberFormatException that occurred when trying to parse this null value. These stacktraces clutter the server.log, for example in my case these stacktraces are responsible for 50% of the size of the (debug) log file.

      This behaviour is caused by the following fragment from BeanMetaData:

      String txTimeout = getOptionalChildContent(maNode, "transaction-timeout");
      try

      { ma.txTimeout = Integer.parseInt(txTimeout); }

      catch (Exception ignore)

      { log.debug("Ignoring transaction-timeout '" + txTimeout + "'", ignore); }

      Of course, this should be: if (txTimeout != null) a.txTimeout = Integer.parseInt(txTimeout);

              Unassigned Unassigned
              petertje_jira Peter Doornbosch (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: