Absence of optional 'transaction-timeout' element throws NumberFormatException
------------------------------------------------------------------------------

         Key: JBAS-1607
         URL: http://jira.jboss.com/jira/browse/JBAS-1607
     Project: JBoss Application Server
        Type: Bug
    Versions: JBossAS-4.0.1 Final    
    Reporter: Peter Doornbosch
    Priority: Minor


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);


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.jboss.com/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
This SF.net email is sponsored by: 2005 Windows Mobile Application Contest
Submit applications for Windows Mobile(tm)-based Pocket PCs or Smartphones
for the chance to win $25,000 and application distribution. Enter today at
http://ads.osdn.com/?ad_id=6882&alloc_id=15148&op=click
_______________________________________________
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to